[FFmpeg-cvslog] r18406 - in trunk/libavcodec: h264.c h264.h h264_parser.c

Vitor Sessak vitor1001
Fri Jul 9 16:28:38 CEST 2010

Resurecting an old thread...

On 04/10/2009 12:54 PM, Reimar D?ffinger wrote:
> On Fri, Apr 10, 2009 at 12:32:10PM +0200, Reimar D?ffinger wrote:
>> On Fri, Apr 10, 2009 at 09:01:56AM +0200, reimar wrote:
>>> Author: reimar
>>> Date: Fri Apr 10 09:01:55 2009
>>> New Revision: 18406
>>> Log:
>>> Add a ff_h264_free_context function and call it from the H.264 parser.
>>> This ensures that the parser will no longer leak memory for all SPS/PPS it encounters.
>> Hmm.. there is a problem I missed...
>> ff_h264_free_context calls free_tables - I think that would not be
>> necessary to fix the memleak, but it does seem safer.
>> The problem is though, that free_tables contains this:
>>> for(i = 0; i<  h->s.avctx->thread_count; i++) {
>> and avctx is not set in the parser.
>> Does adding a
>> if (!h->s.avctx) return;
>> before that seem a reasonable solution?
> I was quite confused as to how I could miss this...
> It seems neither FATE nor make test cover the H.264 parser, at
> least not if it crashes upon closing, Mike could you consider maybe
> adding one of the samples from issue 706 or 944 (with -an)? I guess the
> full 6MB of those are probably a bit big...

Can you suggest any other files? The one from issue 944 does not seem to 
use the parser and the one from issue 706 decodes as junk (and always 
did, I tried it with r18407 too).


More information about the ffmpeg-cvslog mailing list