summaryrefslogtreecommitdiff
path: root/libavcodec/pthread.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-05-17 00:17:48 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-05-17 00:28:51 +0200
commitab074ab9fef8e218f922725ae1e54d0e61661de8 (patch)
tree3d2a1e93358308f7a8e7fd19f91f7d12a688481d /libavcodec/pthread.c
parent3da726f18853262203fb050d971a6a4859ef0175 (diff)
downloadffmpeg-ab074ab9fef8e218f922725ae1e54d0e61661de8.tar.gz
avcodec/pthread: fix ffv1 with 2 threads
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/pthread.c')
-rw-r--r--libavcodec/pthread.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/pthread.c b/libavcodec/pthread.c
index 6942c1ebf1..5074f4a64a 100644
--- a/libavcodec/pthread.c
+++ b/libavcodec/pthread.c
@@ -651,9 +651,10 @@ int ff_thread_decode_frame(AVCodecContext *avctx,
* If we're still receiving the initial packets, don't return a frame.
*/
- if (fctx->delaying) {
- if (fctx->next_decoding >= (avctx->thread_count-1-(avctx->codec_id == AV_CODEC_ID_FFV1))) fctx->delaying = 0;
+ if (fctx->next_decoding > (avctx->thread_count-1-(avctx->codec_id == AV_CODEC_ID_FFV1)))
+ fctx->delaying = 0;
+ if (fctx->delaying) {
*got_picture_ptr=0;
if (avpkt->size)
return avpkt->size;