[FFmpeg-devel] [PATCH]Release buffers after encoding svq1

Carl Eugen Hoyos cehoyos at ag.or.at
Fri Dec 23 02:34:12 CET 2011


Hi!

Attached patch fixes ticket #820 for me.

Please review, Carl Eugen
-------------- next part --------------
diff --git a/libavcodec/svq1enc.c b/libavcodec/svq1enc.c
index 9e6111a..feceaee 100644
--- a/libavcodec/svq1enc.c
+++ b/libavcodec/svq1enc.c
@@ -563,6 +563,10 @@ static av_cold int svq1_encode_end(AVCodecContext *avctx)
         av_freep(&s->motion_val8[i]);
         av_freep(&s->motion_val16[i]);
     }
+    if(s->current_picture.data[0])
+        avctx->release_buffer(avctx, &s->current_picture);
+    if(s->last_picture.data[0])
+        avctx->release_buffer(avctx, &s->last_picture);
 
     return 0;
 }


More information about the ffmpeg-devel mailing list