[Ffmpeg-cvslog] CVS: ffmpeg/libavcodec h264.c,1.191,1.192

Loren Merritt CVS lorenm
Sat Feb 25 23:15:26 CET 2006


Update of /cvsroot/ffmpeg/ffmpeg/libavcodec
In directory mail:/var2/tmp/cvs-serv15702

Modified Files:
	h264.c 
Log Message:
fix a memory leak on seeking.



Index: h264.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/h264.c,v
retrieving revision 1.191
retrieving revision 1.192
diff -u -d -r1.191 -r1.192
--- h264.c	22 Feb 2006 05:59:44 -0000	1.191
+++ h264.c	25 Feb 2006 22:15:24 -0000	1.192
@@ -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)





More information about the ffmpeg-cvslog mailing list