diff mbox series

[FFmpeg-devel,3/3] avcodec/vp8: Change criterion for calling ff_thread_finish_setup()

Message ID AS8P250MB074485EABC1DB9979BF021F58F7D2@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM
State Accepted
Commit d525dbb41f5236ed2dc74041e9db7022bcb5bb86
Headers show
Series [FFmpeg-devel,1/3] avcodec/vp8: Enforce key-frame only for WebP | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Andreas Rheinhardt Jan. 30, 2024, 9:26 p.m. UTC
The current criterion is to check for the existence of
update_thread_context. Change this to check for whether
we are actually decoding VP8 (and not VP7 or VP8-in-WebP).
This is equivalent to the current criterion, but allows
the WebP decoder to evolve and to get its own update_thread_context.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/vp8.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c
index 6b49ec9fe7..dd6c1b361b 100644
--- a/libavcodec/vp8.c
+++ b/libavcodec/vp8.c
@@ -2754,7 +2754,7 @@  int vp78_decode_frame(AVCodecContext *avctx, AVFrame *rframe, int *got_frame,
 
     s->next_framep[VP8_FRAME_CURRENT] = curframe;
 
-    if (ffcodec(avctx->codec)->update_thread_context)
+    if (!is_vp7 && !s->actually_webp)
         ff_thread_finish_setup(avctx);
 
     if (avctx->hwaccel) {