aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2013-03-18 17:09:49 +0100
committerAnton Khirnov <anton@khirnov.net>2013-03-19 11:19:08 +0100
commitc71c80f53b6a63fd6360d9de5a262f9e7c85681f (patch)
treed4b837d0cdc0cd2a118f55261bc4f35fa9027716
parent4e70d66ded537cadd32dbd02a38c3d86a203c812 (diff)
downloadffmpeg-c71c80f53b6a63fd6360d9de5a262f9e7c85681f.tar.gz
pthread: unref already decoded frames when flushing the decoder
Signed-off-by: Anton Khirnov <anton@khirnov.net>
-rw-r--r--libavcodec/pthread.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/pthread.c b/libavcodec/pthread.c
index 70610909fb..9a92288dbb 100644
--- a/libavcodec/pthread.c
+++ b/libavcodec/pthread.c
@@ -890,6 +890,7 @@ void ff_thread_flush(AVCodecContext *avctx)
PerThreadContext *p = &fctx->threads[i];
// Make sure decode flush calls with size=0 won't return old frames
p->got_frame = 0;
+ av_frame_unref(&p->frame);
release_delayed_buffers(p);
}