summaryrefslogtreecommitdiff
path: root/libavcodec/dxv.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/dxv.c')
-rw-r--r--libavcodec/dxv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/dxv.c b/libavcodec/dxv.c
index 1e6791e63f..e1c7cee3e8 100644
--- a/libavcodec/dxv.c
+++ b/libavcodec/dxv.c
@@ -955,7 +955,7 @@ static int dxv_decompress_dxt5(AVCodecContext *avctx)
break;
case 2:
/* Copy two dwords from a previous index */
- idx = 8 + bytestream2_get_le16(gbc);
+ idx = 8 + 4 * bytestream2_get_le16(gbc);
if (idx > pos || (unsigned int)(pos - idx) + 2 > ctx->tex_size / 4)
return AVERROR_INVALIDDATA;
prev = AV_RL32(ctx->tex_data + 4 * (pos - idx));