[FFmpeg-cvslog] threads: Perform the generic progress cleanup more carefully.

Michael Niedermayer git at videolan.org
Fri Mar 30 22:57:36 CEST 2012


ffmpeg | branch: xbmc_0.10.2 | Michael Niedermayer <michaelni at gmx.at> | Sat Feb 11 20:14:33 2012 +0100| [05f8b5549c5e20cf9a417069838edd6841d7bd40] | committer: Joakim Plate

threads: Perform the generic progress cleanup more carefully.

The cleanup is only done now when
a picture is returned (assuming that it has to be done when its returned)
a error is returned (assuming that there will be no further progress on the frame)
the codec is not h264 (this is still needed due to some deadlocks in realvideo)

This fixes a decoding regression with 00017.MTS

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=05f8b5549c5e20cf9a417069838edd6841d7bd40
---

 libavcodec/pthread.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavcodec/pthread.c b/libavcodec/pthread.c
index 6ae763d..c58222b 100644
--- a/libavcodec/pthread.c
+++ b/libavcodec/pthread.c
@@ -390,7 +390,7 @@ static attribute_align_arg void *frame_worker_thread(void *arg)
 
         pthread_mutex_lock(&p->progress_mutex);
         for (i = 0; i < MAX_BUFFERS; i++)
-            if (p->progress_used[i]) {
+            if (p->progress_used[i] && (p->got_frame || p->result<0 || avctx->codec_id != CODEC_ID_H264)) {
                 p->progress[i][0] = INT_MAX;
                 p->progress[i][1] = INT_MAX;
             }



More information about the ffmpeg-cvslog mailing list