# HG changeset patch # User lorenm # Date 1140905724 0 # Node ID 84406a59134cc29602f6796aedd4ddcc55728b7d # Parent ef36cc95e4abb6b9a105f7ef095102b82be81989 fix a memory leak on seeking. diff -r ef36cc95e4ab -r 84406a59134c h264.c --- a/h264.c Fri Feb 24 09:16:26 2006 +0000 +++ b/h264.c Sat Feb 25 22:15:24 2006 +0000 @@ -3909,8 +3909,13 @@ static void flush_dpb(AVCodecContext *avctx){ H264Context *h= avctx->priv_data; int i; - for(i=0; i<16; i++) + for(i=0; i<16; i++) { + if(h->delayed_pic[i]) + h->delayed_pic[i]->reference= 0; h->delayed_pic[i]= NULL; + } + if(h->delayed_output_pic) + h->delayed_output_pic->reference= 0; h->delayed_output_pic= NULL; idr(h); if(h->s.current_picture_ptr)