av_log_missing_feature(s, "Width/height changing in CAVS is", 0);
return -1;
}
+ if (width <= 0 || height <= 0) {
+ av_log(s, AV_LOG_ERROR, "Dimensions invalid\n");
+ return AVERROR_INVALIDDATA;
+ }
s->width = width;
s->height = height;
skip_bits(&s->gb,2); //chroma format
AVCodec ff_cavs_decoder = {
.name = "cavs",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_CAVS,
+ .id = AV_CODEC_ID_CAVS,
.priv_data_size = sizeof(AVSContext),
.init = ff_cavs_init,
.close = ff_cavs_end,
.decode = cavs_decode_frame,
.capabilities = CODEC_CAP_DR1 | CODEC_CAP_DELAY,
.flush = cavs_flush,
- .long_name = NULL_IF_CONFIG_SMALL("Chinese AVS video (AVS1-P2, JiZhun profile)"),
+ .long_name = NULL_IF_CONFIG_SMALL("Chinese AVS (Audio Video Standard) (AVS1-P2, JiZhun profile)"),
};