summaryrefslogtreecommitdiff
path: root/libavcodec/flashsv.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/flashsv.c')
-rw-r--r--libavcodec/flashsv.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/flashsv.c b/libavcodec/flashsv.c
index 82c66dbfd9..f9af396650 100644
--- a/libavcodec/flashsv.c
+++ b/libavcodec/flashsv.c
@@ -255,7 +255,8 @@ static int flashsv_decode_frame(AVCodecContext *avctx, void *data,
if (buf_size < 4)
return -1;
- init_get_bits(&gb, avpkt->data, buf_size * 8);
+ if ((ret = init_get_bits(&gb, avpkt->data, buf_size)) < 0)
+ return ret;
/* start to parse the bitstream */
s->block_width = 16 * (get_bits(&gb, 4) + 1);