Commit 18a7f746 authored by Michael Niedermayer's avatar Michael Niedermayer

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: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 6be09608
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment