mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-19 22:10:34 +00:00
avcodec/vp9: Reduce wait times
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
0ba058579f
commit
98e1e848ef
@ -1569,14 +1569,15 @@ static int vp9_decode_frame(AVCodecContext *avctx, AVFrame *frame,
|
||||
av_log(avctx, AV_LOG_ERROR, "Requested reference %d not available\n", ref);
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
for (int i = 0; i < 8; i++)
|
||||
ff_progress_frame_replace(&s->next_refs[i], &s->s.refs[i]);
|
||||
ff_thread_finish_setup(avctx);
|
||||
ff_progress_frame_await(&s->s.refs[ref], INT_MAX);
|
||||
|
||||
if ((ret = av_frame_ref(frame, s->s.refs[ref].f)) < 0)
|
||||
return ret;
|
||||
frame->pts = pkt->pts;
|
||||
frame->pkt_dts = pkt->dts;
|
||||
for (int i = 0; i < 8; i++)
|
||||
ff_progress_frame_replace(&s->next_refs[i], &s->s.refs[i]);
|
||||
*got_frame = 1;
|
||||
return pkt->size;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user