[FFmpeg-cvslog] avcodec/mimic: use av_freep() and reset swap_buf_size

Paul B Mahol git at videolan.org
Fri Nov 8 20:24:40 CET 2013


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Fri Nov  8 14:23:45 2013 +0000| [b8f276e6457413530a38a16a4e79988932d7e661] | committer: Paul B Mahol

avcodec/mimic: use av_freep() and reset swap_buf_size

Signed-off-by: Paul B Mahol <onemda at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b8f276e6457413530a38a16a4e79988932d7e661
---

 libavcodec/mimic.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavcodec/mimic.c b/libavcodec/mimic.c
index a1cb5e7..31d6393 100644
--- a/libavcodec/mimic.c
+++ b/libavcodec/mimic.c
@@ -116,7 +116,8 @@ static av_cold int mimic_decode_end(AVCodecContext *avctx)
     MimicContext *ctx = avctx->priv_data;
     int i;
 
-    av_free(ctx->swap_buf);
+    av_freep(&ctx->swap_buf);
+    ctx->swap_buf_size = 0;
 
     for (i = 0; i < FF_ARRAY_ELEMS(ctx->frames); i++) {
         if (ctx->frames[i].f)



More information about the ffmpeg-cvslog mailing list