[FFmpeg-devel] [PATCH] CrystalHD: Use mp4toannexb bitstream filter.

Philip Langdale philipl at overt.org
Mon Jun 13 04:09:47 CEST 2011


On Sun, 12 Jun 2011 20:40:45 +0200
Michael Niedermayer <michaelni at gmx.at> wrote:

> 
> Well, you dont seem to free the data so its not surprising theres a
> leak
> 
> when the filter allocates new memory it has to be freed, when it
> doesnt allocate it, freeing leads to an error.
> the return code from av_bitstream_filter_filter() says if memory was
> allocated

So, this is looking like a fundamental incompatibility with how mplayer
uses ffmpeg. It passes the data buffer in using an avpkt with no
destruct function set. So, av_free_packet in my code (in imitation of
write_frame()) does nothing, and the replacement buffer from
filter_filter() is leaked because mplayer never calls av_free_packet.

I will need to store the filter output buffer locally and free it inside
my decode() function. This doesn't seem so profound in hindsight but
it's not what the extant code leads one to believe.
 
Thanks,

--phil
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110612/3cc863c6/attachment.asc>


More information about the ffmpeg-devel mailing list