aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-02-11 20:14:33 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-02-12 20:24:29 +0100
commit18a7f7465e7e6b9c3688ffc23230ae7a0639a771 (patch)
treed890c4508669b017226395c3314c8ecd8c9b4097 /libavcodec
parent6be0960851d41bb1aa2c9bebcbad45f715de939a (diff)
downloadffmpeg-18a7f7465e7e6b9c3688ffc23230ae7a0639a771.tar.gz
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@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/pthread.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/pthread.c b/libavcodec/pthread.c
index 0e64a325b1..9e1c1e24d7 100644
--- a/libavcodec/pthread.c
+++ b/libavcodec/pthread.c
@@ -388,7 +388,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;
}