]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/fic.c
avcodec/truemotion2rt: Fix rounding in input size check
[ffmpeg] / libavcodec / fic.c
index 7f70ee47e663d1dd02c97c987272b6fa00788080..dcf0777674285d77ddd8e0845e9db1cb77be85a2 100644 (file)
@@ -338,6 +338,10 @@ static int fic_decode_frame(AVCodecContext *avctx, void *data,
         skip_cursor = 1;
     }
 
+    if (!skip_cursor && avpkt->size < CURSOR_OFFSET + sizeof(ctx->cursor_buf)) {
+        skip_cursor = 1;
+    }
+
     /* Slice height for all but the last slice. */
     ctx->slice_h = 16 * (ctx->aligned_height >> 4) / nslices;
     if (ctx->slice_h % 16)
@@ -465,7 +469,7 @@ static const AVOption options[] = {
 };
 
 static const AVClass fic_decoder_class = {
-    .class_name = "FIC encoder",
+    .class_name = "FIC decoder",
     .item_name  = av_default_item_name,
     .option     = options,
     .version    = LIBAVUTIL_VERSION_INT,