summaryrefslogtreecommitdiffstats
path: root/media/ffvpx/libavcodec/vp8.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:37 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:37 +0000
commita90a5cba08fdf6c0ceb95101c275108a152a3aed (patch)
tree532507288f3defd7f4dcf1af49698bcb76034855 /media/ffvpx/libavcodec/vp8.c
parentAdding debian version 126.0.1-1. (diff)
downloadfirefox-a90a5cba08fdf6c0ceb95101c275108a152a3aed.tar.xz
firefox-a90a5cba08fdf6c0ceb95101c275108a152a3aed.zip
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'media/ffvpx/libavcodec/vp8.c')
-rw-r--r--media/ffvpx/libavcodec/vp8.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/media/ffvpx/libavcodec/vp8.c b/media/ffvpx/libavcodec/vp8.c
index 83c60adeb0..539b5c5395 100644
--- a/media/ffvpx/libavcodec/vp8.c
+++ b/media/ffvpx/libavcodec/vp8.c
@@ -26,6 +26,7 @@
#include "config_components.h"
+#include "libavutil/mem.h"
#include "libavutil/mem_internal.h"
#include "avcodec.h"
@@ -2665,7 +2666,11 @@ int vp78_decode_frame(AVCodecContext *avctx, AVFrame *rframe, int *got_frame,
if (ret < 0)
goto err;
- if (s->actually_webp) {
+ if (!is_vp7 && s->actually_webp) {
+ // VP8 in WebP is supposed to be intra-only. Enforce this here
+ // to ensure that output is reproducible with frame-threading.
+ if (!s->keyframe)
+ return AVERROR_INVALIDDATA;
// avctx->pix_fmt already set in caller.
} else if (!is_vp7 && s->pix_fmt == AV_PIX_FMT_NONE) {
s->pix_fmt = get_pixel_format(s);
@@ -2750,7 +2755,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) {
@@ -2883,7 +2888,6 @@ int vp78_decode_init(AVCodecContext *avctx, int is_vp7)
int ret;
s->avctx = avctx;
- s->vp7 = avctx->codec->id == AV_CODEC_ID_VP7;
s->pix_fmt = AV_PIX_FMT_NONE;
avctx->pix_fmt = AV_PIX_FMT_YUV420P;