return 1 + ncol * 3;
}
-static int decode_555(GetByteContext *gB, uint16_t *dst, ptrdiff_t stride,
+static int decode_555(AVCodecContext *avctx, GetByteContext *gB, uint16_t *dst, ptrdiff_t stride,
int keyframe, int w, int h)
{
int last_symbol = 0, repeat = 0, prev_avail = 0;
repeat = 0;
while (b-- > 130) {
if (repeat >= (INT_MAX >> 8) - 1) {
- av_log(NULL, AV_LOG_ERROR, "repeat overflow\n");
+ av_log(avctx, AV_LOG_ERROR, "repeat overflow\n");
return AVERROR_INVALIDDATA;
}
repeat = (repeat << 8) + bytestream2_get_byte(gB) + 1;
if (is_555) {
bytestream2_init(&gB, buf, buf_size);
- if (decode_555(&gB, (uint16_t *)c->rgb_pic, c->rgb_stride >> 1,
+ if (decode_555(avctx, &gB, (uint16_t *)c->rgb_pic, c->rgb_stride >> 1,
keyframe, avctx->width, avctx->height))
return AVERROR_INVALIDDATA;