]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/qdrw.c
avcodec: Constify AVCodecs
[ffmpeg] / libavcodec / qdrw.c
index 32ba41096863a5a35381f98201728d818da15b98..fcc1de0c62856ea08c4a335d56ccecca29cf0d6b 100644 (file)
@@ -455,6 +455,8 @@ static int decode_frame(AVCodecContext *avctx,
                 avpriv_request_sample(avctx, "Pack type %d", pack_type);
                 return AVERROR_PATCHWELCOME;
             }
+            if (bytestream2_get_bytes_left(&gbc) < 30)
+                return AVERROR_INVALIDDATA;
             if ((ret = ff_get_buffer(avctx, p, 0)) < 0)
                 return ret;
 
@@ -512,7 +514,7 @@ static int decode_frame(AVCodecContext *avctx,
     }
 }
 
-AVCodec ff_qdraw_decoder = {
+const AVCodec ff_qdraw_decoder = {
     .name           = "qdraw",
     .long_name      = NULL_IF_CONFIG_SMALL("Apple QuickDraw"),
     .type           = AVMEDIA_TYPE_VIDEO,