diff options
author | Michael Niedermayer <[email protected]> | 2014-04-21 16:25:21 +0200 |
---|---|---|
committer | Michael Niedermayer <[email protected]> | 2014-04-21 16:25:24 +0200 |
commit | 0162ad1a59976b6b63fc241186336faa4a0a023d (patch) | |
tree | 231964ab48de431d06fe2a09428adc757c73079e | |
parent | fa73d13678c49f2e68a445577b48ba3c2e615e19 (diff) | |
parent | 2eb15cdeef29eb8a0a32658154decba94b4b89cb (diff) |
Merge commit '2eb15cdeef29eb8a0a32658154decba94b4b89cb' into release/1.1
* commit '2eb15cdeef29eb8a0a32658154decba94b4b89cb':
pthread: flush all threads on flush, not just the first one
Merged-by: Michael Niedermayer <[email protected]>
-rw-r--r-- | libavcodec/pthread.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/pthread.c b/libavcodec/pthread.c index 20398302f7..4a79e538af 100644 --- a/libavcodec/pthread.c +++ b/libavcodec/pthread.c @@ -908,8 +908,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; @@ -921,6 +919,9 @@ void ff_thread_flush(AVCodecContext *avctx) p->got_frame = 0; release_delayed_buffers(p); + + if (avctx->codec->flush) + avctx->codec->flush(p->avctx); } } |