]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/vqf.c
avformat: Constify all muxer/demuxers
[ffmpeg] / libavformat / vqf.c
index 617a9706f4330b327132f177dc86808bbf77240e..431ba1a0c9f2a58094955710f91e32f74b73a8a9 100644 (file)
@@ -132,6 +132,9 @@ static int vqf_read_header(AVFormatContext *s)
 
         switch(chunk_tag){
         case MKTAG('C','O','M','M'):
+            if (len < 12)
+                return AVERROR_INVALIDDATA;
+
             avio_read(s->pb, comm_chunk, 12);
             st->codecpar->channels = AV_RB32(comm_chunk    ) + 1;
             read_bitrate        = AV_RB32(comm_chunk + 4);
@@ -284,7 +287,7 @@ static int vqf_read_seek(AVFormatContext *s,
     return 0;
 }
 
-AVInputFormat ff_vqf_demuxer = {
+const AVInputFormat ff_vqf_demuxer = {
     .name           = "vqf",
     .long_name      = NULL_IF_CONFIG_SMALL("Nippon Telegraph and Telephone Corporation (NTT) TwinVQ"),
     .priv_data_size = sizeof(VqfContext),