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

Reimar Döffinger Reimar.Doeffinger
Fri Apr 10 12:32:10 CEST 2009


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?



More information about the ffmpeg-cvslog mailing list