]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/cavsdec.c
mips: add assembler flags for mips32r2 ISA and mhard-float
[ffmpeg] / libavcodec / cavsdec.c
index a0b257466b36d34ba3466371d176103b80705adc..099599ae510b59f4511de854ba700a4c4d59fb68 100644 (file)
@@ -625,6 +625,10 @@ static int decode_seq_header(AVSContext *h) {
         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
@@ -733,12 +737,12 @@ static int cavs_decode_frame(AVCodecContext * avctx,void *data, int *data_size,
 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)"),
 };