[FFmpeg-cvslog] pthread: unref the decoded but not returned frames on close.

Anton Khirnov git at videolan.org
Wed Mar 13 13:44:39 CET 2013


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Mon Mar 11 18:04:58 2013 +0100| [fce68c93554803801c32c1b20509bfa8d496b02a] | committer: Anton Khirnov

pthread: unref the decoded but not returned frames on close.

Fixes memleaks when frame mt is used and the decoder is not flushed at
the end.

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

 libavcodec/pthread.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/pthread.c b/libavcodec/pthread.c
index 280c08e..7061090 100644
--- a/libavcodec/pthread.c
+++ b/libavcodec/pthread.c
@@ -749,6 +749,7 @@ static void frame_thread_free(AVCodecContext *avctx, int thread_count)
         avctx->codec = NULL;
 
         release_delayed_buffers(p);
+        av_frame_unref(&p->frame);
     }
 
     for (i = 0; i < thread_count; i++) {



More information about the ffmpeg-cvslog mailing list