uint8_t *Y1, *Y2, *Y3, *Y4, *U, *V;
int ret;
- if (src_size < avctx->width * avctx->height * 9L / 8) {
+ if (src_size < avctx->width * avctx->height * 9LL / 8) {
av_log(avctx, AV_LOG_ERROR, "packet too small\n");
return AVERROR_INVALIDDATA;
}
uint8_t *Y1, *Y2, *U, *V;
int ret;
- if (src_size < avctx->width * avctx->height * 3L / 2) {
+ if (src_size < avctx->width * avctx->height * 3LL / 2) {
av_log(avctx, AV_LOG_ERROR, "packet too small\n");
return AVERROR_INVALIDDATA;
}
uint8_t *Y, *U, *V;
int ret;
- if (src_size < avctx->width * avctx->height * 3L) {
+ if (src_size < avctx->width * avctx->height * 3LL) {
av_log(avctx, AV_LOG_ERROR, "packet too small\n");
return AVERROR_INVALIDDATA;
}
"Slice sizes mismatch: got %"PRIu32" instead of %"PRIu32"\n",
AV_RL32(src + off), slice_size - 16);
}
- init_get_bits(&gb2, src + off + 16, (slice_size - 16) * 8);
+ if ((ret = init_get_bits8(&gb2, src + off + 16, slice_size - 16)) < 0)
+ return ret;
dx2_decode_slice_565(&gb2, avctx->width, slice_height, dst,
pic->linesize[0], is_565);
"Slice sizes mismatch: got %"PRIu32" instead of %"PRIu32"\n",
AV_RL32(src + off), slice_size - 16);
}
- init_get_bits(&gb2, src + off + 16, (slice_size - 16) * 8);
+ if ((ret = init_get_bits8(&gb2, src + off + 16, slice_size - 16)) < 0)
+ return ret;
dx2_decode_slice_rgb(&gb2, avctx->width, slice_height, dst,
pic->linesize[0]);
"Slice sizes mismatch: got %"PRIu32" instead of %"PRIu32"\n",
AV_RL32(src + off), slice_size - 16);
}
- init_get_bits(&gb2, src + off + 16, (slice_size - 16) * 8);
+ if ((ret = init_get_bits8(&gb2, src + off + 16, slice_size - 16)) < 0)
+ return ret;
dx2_decode_slice_410(&gb2, avctx->width, slice_height, Y, U, V,
pic->linesize[0], pic->linesize[1],
pic->linesize[2]);
"Slice sizes mismatch: got %"PRIu32" instead of %"PRIu32"\n",
AV_RL32(src + off), slice_size - 16);
}
- init_get_bits(&gb2, src + off + 16, (slice_size - 16) * 8);
+ if ((ret = init_get_bits8(&gb2, src + off + 16, slice_size - 16)) < 0)
+ return ret;
dx2_decode_slice_420(&gb2, avctx->width, slice_height, Y, U, V,
pic->linesize[0], pic->linesize[1],
pic->linesize[2]);
"Slice sizes mismatch: got %"PRIu32" instead of %"PRIu32"\n",
AV_RL32(src + off), slice_size - 16);
}
- init_get_bits(&gb2, src + off + 16, (slice_size - 16) * 8);
+ if ((ret = init_get_bits8(&gb2, src + off + 16, slice_size - 16)) < 0)
+ return ret;
dx2_decode_slice_444(&gb2, avctx->width, slice_height, Y, U, V,
pic->linesize[0], pic->linesize[1],
pic->linesize[2]);