---
libavcodec/pthread.c | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/libavcodec/pthread.c b/libavcodec/pthread.c
index 83a3df7..793a8b9 100644
--- a/libavcodec/pthread.c
+++ b/libavcodec/pthread.c
@@ -463,20 +463,20 @@ int ff_decode_frame_threaded(AVCodecContext *avctx,
//If it's draining frames at EOF, ignore null frames from the codec.
//Only return one when we've run out of codec frames to return.
do {
- p = &fctx->threads[returning_thread++];
+ p = &fctx->threads[returning_thread++];
- 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);
+ 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);
- *(AVFrame*)data = p->picture;
- *data_size = p->got_picture;
+ *(AVFrame*)data = p->picture;
+ *data_size = p->got_picture;
- avcodec_get_frame_defaults(&p->picture);
- p->got_picture = 0;
+ avcodec_get_frame_defaults(&p->picture);
+ p->got_picture = 0;
- if (returning_thread >= thread_count) returning_thread = 0;
+ if (returning_thread >= thread_count) returning_thread = 0;
} while (!buf_size && !*data_size && returning_thread != fctx->next_finished);
err = update_context_from_copy(avctx, p->avctx, 1);
_______________________________________________
FFmpeg-soc mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-soc