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

Michael Niedermayer michaelni
Wed Dec 19 12:51:51 CET 2007


On Wed, Dec 19, 2007 at 12:19:27PM +0100, Reimar D?ffinger wrote:
> Hello,
> 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
> ByteIOContext.
> 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.

true


> Maybe I should rename fclose_byteio to free_byteio to be clearer?

Id say just apply the older patch with the 2 close functions :)
One for each *open*.

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Complexity theory is the science of finding the exact solution to an
approximation. Benchmarking OTOH is finding an approximation of the exact
-------------- 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/20071219/45bb114d/attachment.pgp>



More information about the ffmpeg-devel mailing list