ffmpeg | branch: master | Anton Khirnov <an...@khirnov.net> | Mon Aug  8 
13:32:54 2016 +0200| [e9bfff1cc66c85b91b262c41e8aa5e8685606225] | committer: 
Anton Khirnov

lavc: free buffer_frame/pkt on avcodec_open2() failure

Fixes memory leaks in some FATE tests.

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

 libavcodec/utils.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index ce86bfa..837edbd 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -1199,6 +1199,8 @@ FF_ENABLE_DEPRECATION_WARNINGS
     av_freep(&avctx->priv_data);
     if (avctx->internal) {
         av_frame_free(&avctx->internal->to_free);
+        av_frame_free(&avctx->internal->buffer_frame);
+        av_packet_free(&avctx->internal->buffer_pkt);
         av_freep(&avctx->internal->pool);
     }
     av_freep(&avctx->internal);

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

Reply via email to