Release buffers after encoding svq1.
authorCarl Eugen Hoyos <cehoyos@ag.or.at>
Fri, 23 Dec 2011 10:39:41 +0000 (11:39 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 3 Jan 2012 21:27:59 +0000 (22:27 +0100)
Fixes ticket #820.
(cherry picked from commit 8e88145d0b43a4572c1c13431c4f7ba644547c80)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/svq1enc.c

index 9e6111a..feceaee 100644 (file)
@@ -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;
 }