---
 libavcodec/framethread.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/libavcodec/framethread.c b/libavcodec/framethread.c
index bd5d341..abe8c98 100644
--- a/libavcodec/framethread.c
+++ b/libavcodec/framethread.c
@@ -170,14 +170,12 @@ int ff_decode_frame_threaded(AVCodecContext *avctx,
         return 0;
     }
 
-    p = &fctx->threads[fctx->next_ready];
+    p = &fctx->threads[fctx->next_ready++];
 
     pthread_mutex_lock(&p->progress_mutex);
     while (p->state != STATE_INPUT_READY) {pthread_cond_wait(&p->output_cond, &p->progress_mutex);}
     pthread_mutex_unlock(&p->progress_mutex);
 
-    fctx->next_ready++;
-
     *(AVFrame*)data = p->result;
     *data_size = p->output_size;
 
_______________________________________________
FFmpeg-soc mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-soc

Reply via email to