summaryrefslogtreecommitdiff
path: root/chromium/third_party/ffmpeg/libavcodec/dxv.c
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2019-08-30 10:22:43 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2019-08-30 12:36:28 +0000
commit271a6c3487a14599023a9106329505597638d793 (patch)
treee040d58ffc86c1480b79ca8528020ca9ec919bf8 /chromium/third_party/ffmpeg/libavcodec/dxv.c
parent7b2ffa587235a47d4094787d72f38102089f402a (diff)
downloadqtwebengine-chromium-271a6c3487a14599023a9106329505597638d793.tar.gz
BASELINE: Update Chromium to 77.0.3865.59
Change-Id: I1e89a5f3b009a9519a6705102ad65c92fe736f21 Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'chromium/third_party/ffmpeg/libavcodec/dxv.c')
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/dxv.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/chromium/third_party/ffmpeg/libavcodec/dxv.c b/chromium/third_party/ffmpeg/libavcodec/dxv.c
index 6fe5516505a..ae79de981f7 100644
--- a/chromium/third_party/ffmpeg/libavcodec/dxv.c
+++ b/chromium/third_party/ffmpeg/libavcodec/dxv.c
@@ -745,6 +745,9 @@ static int dxv_decompress_cocg(DXVContext *ctx, GetByteContext *gb,
int skip0, skip1, oi0 = 0, oi1 = 0;
int ret, state0 = 0, state1 = 0;
+ if (op_offset < 12)
+ return AVERROR_INVALIDDATA;
+
dst = tex_data;
bytestream2_skip(gb, op_offset - 12);
if (op_size0 > max_op_size0)
@@ -1054,6 +1057,10 @@ static int dxv_decode(AVCodecContext *avctx, void *data,
avctx->pix_fmt = AV_PIX_FMT_RGBA;
avctx->colorspace = AVCOL_SPC_RGB;
+ ctx->tex_funct = NULL;
+ ctx->tex_funct_planar[0] = NULL;
+ ctx->tex_funct_planar[1] = NULL;
+
tag = bytestream2_get_le32(gbc);
switch (tag) {
case MKBETAG('D', 'X', 'T', '1'):