if (get_bits_long(&hgb, 32) != MKBETAG('m','j','p','g'))
{
av_log(avctx, AV_LOG_WARNING, "not mjpeg-b (bad fourcc)\n");
- return 0;
+ return AVERROR_INVALIDDATA;
}
field_size = get_bits_long(&hgb, 32); /* field size */
picture->quality*= FF_QP2LAMBDA;
}
- return buf_ptr - buf;
+ return buf_size;
}
AVCodec ff_mjpegb_decoder = {
.name = "mjpegb",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_MJPEGB,
+ .id = AV_CODEC_ID_MJPEGB,
.priv_data_size = sizeof(MJpegDecodeContext),
.init = ff_mjpeg_decode_init,
.close = ff_mjpeg_decode_end,
.decode = mjpegb_decode_frame,
.capabilities = CODEC_CAP_DR1,
- .max_lowres = 3,
- .long_name = NULL_IF_CONFIG_SMALL("Apple MJPEG-B"),
+ .long_name = NULL_IF_CONFIG_SMALL("Apple MJPEG-B"),
};