]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/paf.c
avformat: Constify all muxer/demuxers
[ffmpeg] / libavformat / paf.c
index 6183dc111533365dab9706fdce2386d0bab30a9c..f48b2e60cd3798171ba2e1e406c5ef93235bc18f 100644 (file)
@@ -136,6 +136,10 @@ static int read_header(AVFormatContext *s)
     p->start_offset   = avio_rl32(pb);
     p->max_video_blks = avio_rl32(pb);
     p->max_audio_blks = avio_rl32(pb);
+
+    if (avio_feof(pb))
+        return AVERROR_INVALIDDATA;
+
     if (p->buffer_size    < 175  ||
         p->max_audio_blks < 2    ||
         p->max_video_blks < 1    ||
@@ -267,7 +271,7 @@ static int read_packet(AVFormatContext *s, AVPacket *pkt)
     return pkt->size;
 }
 
-AVInputFormat ff_paf_demuxer = {
+const AVInputFormat ff_paf_demuxer = {
     .name           = "paf",
     .long_name      = NULL_IF_CONFIG_SMALL("Amazing Studio Packed Animation File"),
     .priv_data_size = sizeof(PAFDemuxContext),