aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-08-16 22:48:36 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2024-04-19 13:18:04 +0200
commit98e1e848ef68f00d6d120413b263a76f5d07cf65 (patch)
treebab4c99cb2bd6e77e1b647b5da8cd216e71e0189 /libavcodec
parent0ba058579f332b3060d8470a04ddd3fbf305be61 (diff)
downloadffmpeg-98e1e848ef68f00d6d120413b263a76f5d07cf65.tar.gz
avcodec/vp9: Reduce wait times
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/vp9.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c
index e0bc313301..bdfa543188 100644
--- a/libavcodec/vp9.c
+++ b/libavcodec/vp9.c
@@ -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;
}