Commit 5c7f2cf8 authored by Derek Buitenhuis's avatar Derek Buitenhuis Committed by Anton Khirnov

h264_slice: Wait for refs to be available before we use them in error concealment

This could happen when there was a frame number gap and frame threading was used.
Debugging-by: 's avatarRonald S. Bultje <rsbultje@gmail.com>
Debugging-by: 's avatarJustin Ruggles <justin.ruggles@gmail.com>
Signed-off-by: 's avatarDerek Buitenhuis <derek.buitenhuis@gmail.com>

CC:libav-stable@libav.org
Signed-off-by: 's avatarAnton Khirnov <anton@khirnov.net>
parent 86157e6d
......@@ -1404,6 +1404,9 @@ static int h264_field_start(H264Context *h, const H264SliceContext *sl,
h->short_ref[0]->f->width == prev->f->width &&
h->short_ref[0]->f->height == prev->f->height &&
h->short_ref[0]->f->format == prev->f->format) {
ff_thread_await_progress(&prev->tf, INT_MAX, 0);
if (prev->field_picture)
ff_thread_await_progress(&prev->tf, INT_MAX, 1);
av_image_copy(h->short_ref[0]->f->data,
h->short_ref[0]->f->linesize,
(const uint8_t **)prev->f->data,
......
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