[FFmpeg-devel] [RFC] missing close/free functions for avformat?

Reimar Döffinger Reimar.Doeffinger
Wed Dec 19 12:19:27 CET 2007

On Tue, Dec 18, 2007 at 10:30:03PM +0100, Michael Niedermayer wrote:
> somehow it feels wrong
> what about putting a close function ptr in ByteIOContext instead of calling 
> url_fclose() with the hidden assumtation that opaque is a URLContext?

This is IMO orthogonal, it addresses the issue of _how_ to free
While my variable naming may have obfuscated it, this patch handles
whether the ByteIOContext should be free at all.
In the av_open_input_file function, the ByteIOContext is allocated by
avformat, so IMO it should free it, whereas in the av_open_input_stream
it is provided by the user, and the user should free it.
Maybe I should rename fclose_byteio to free_byteio to be clearer?

Reimar D?ffinger

More information about the ffmpeg-devel mailing list