]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/vp5.c
aacenc: Fix issues with huge values of bit_rate.
[ffmpeg] / libavcodec / vp5.c
index 999b183c7ffe49d8496914df487ae288d6d76fe1..189b20ab85ac6d74eadc81f49d0f90ca8c227cbb 100644 (file)
@@ -57,6 +57,11 @@ static int vp5_parse_header(VP56Context *s, const uint8_t *buf, int buf_size,
         }
         rows = vp56_rac_gets(c, 8);  /* number of stored macroblock rows */
         cols = vp56_rac_gets(c, 8);  /* number of stored macroblock cols */
+        if (!rows || !cols) {
+            av_log(s->avctx, AV_LOG_ERROR, "Invalid size %dx%d\n",
+                   cols << 4, rows << 4);
+            return 0;
+        }
         vp56_rac_gets(c, 8);  /* number of displayed macroblock rows */
         vp56_rac_gets(c, 8);  /* number of displayed macroblock cols */
         vp56_rac_gets(c, 2);
@@ -282,5 +287,5 @@ AVCodec ff_vp5_decoder = {
     .close          = ff_vp56_free,
     .decode         = ff_vp56_decode_frame,
     .capabilities   = CODEC_CAP_DR1,
-    .long_name = NULL_IF_CONFIG_SMALL("On2 VP5"),
+    .long_name      = NULL_IF_CONFIG_SMALL("On2 VP5"),
 };