diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-03-03 22:30:42 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-03-03 22:30:54 +0100 |
commit | c4149c4d54060802f452404f512182d4ec2fb3ec (patch) | |
tree | 5375b4a570e517767dc752f6ea22309433db1547 | |
parent | 8ad2f45964ac9ac03cc48db1b4361101cb3106e3 (diff) | |
parent | 1d1df82093fdacb2cbc443c70c80f8f801002d28 (diff) | |
download | ffmpeg-c4149c4d54060802f452404f512182d4ec2fb3ec.tar.gz |
Merge commit '1d1df82093fdacb2cbc443c70c80f8f801002d28' into release/2.2
* commit '1d1df82093fdacb2cbc443c70c80f8f801002d28':
pthread_frame: flush all threads on flush, not just the first one
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/pthread_frame.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/pthread_frame.c b/libavcodec/pthread_frame.c index 42a3c9b247..d7479d2142 100644 --- a/libavcodec/pthread_frame.c +++ b/libavcodec/pthread_frame.c @@ -727,8 +727,6 @@ void ff_thread_flush(AVCodecContext *avctx) if (fctx->prev_thread) { if (fctx->prev_thread != &fctx->threads[0]) update_context_from_thread(fctx->threads[0].avctx, fctx->prev_thread->avctx, 0); - if (avctx->codec->flush) - avctx->codec->flush(fctx->threads[0].avctx); } fctx->next_decoding = fctx->next_finished = 0; @@ -741,6 +739,9 @@ void ff_thread_flush(AVCodecContext *avctx) av_frame_unref(p->frame); release_delayed_buffers(p); + + if (avctx->codec->flush) + avctx->codec->flush(p->avctx); } } |