]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/ivfdec.c
avformat/mpegtsenc: move is_dvb_subtitle/is_dvb_teletext initialization upwards
[ffmpeg] / libavformat / ivfdec.c
index 197c099bc3312f35cfb9edbcfd642ab718efe58c..3e1ea52cbf13b7ead5a7dccfec7d6ffae058b669 100644 (file)
@@ -23,7 +23,7 @@
 #include "riff.h"
 #include "libavutil/intreadwrite.h"
 
-static int probe(AVProbeData *p)
+static int probe(const AVProbeData *p)
 {
     if (AV_RL32(p->buf) == MKTAG('D','K','I','F')
         && !AV_RL16(p->buf+4) && AV_RL16(p->buf+6) == 32)
@@ -53,7 +53,8 @@ static int read_header(AVFormatContext *s)
     st->codecpar->height     = avio_rl16(s->pb);
     time_base.den         = avio_rl32(s->pb);
     time_base.num         = avio_rl32(s->pb);
-    st->duration          = avio_rl64(s->pb);
+    st->duration          = avio_rl32(s->pb);
+    avio_skip(s->pb, 4); // unused
 
     st->need_parsing      = AVSTREAM_PARSE_HEADERS;
 
@@ -80,7 +81,7 @@ static int read_packet(AVFormatContext *s, AVPacket *pkt)
     return ret;
 }
 
-AVInputFormat ff_ivf_demuxer = {
+const AVInputFormat ff_ivf_demuxer = {
     .name           = "ivf",
     .long_name      = NULL_IF_CONFIG_SMALL("On2 IVF"),
     .read_probe     = probe,