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

Michael Niedermayer michaelni
Sat Dec 15 17:38:02 CET 2007

On Sat, Dec 15, 2007 at 05:28:51PM +0100, Reimar D?ffinger wrote:
> Hello,
> unless I missed something there are no corresponding close/free
> functions for av_alloc_format_context and av_open_input_stream.
> But these are part of the public API, what use are they if there
> is no proper way in freeing the allocated memory...
> It actually seems to me that almost everything except the url_fclose
> should go into a av_free_format_context, do you agree with that?

have you tried:

av_alloc_format_context() - av_free()
av_open_input_stream()    - av_close_input_file


Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Its not that you shouldnt use gotos but rather that you should write
readable code and code with gotos often but not always is less readable
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20071215/29f4d9c0/attachment.pgp>

More information about the ffmpeg-devel mailing list