]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/dxa.c
avcodec/avcodec: Store whether AVCodec->close needs to be called
[ffmpeg] / libavformat / dxa.c
index 27fa6afb6a0cab720a8ad25c335000033df2c6ef..9e5d163db73eb998c6154df3e6e0b2e49fd4cb5d 100644 (file)
@@ -143,7 +143,7 @@ static int dxa_read_header(AVFormatContext *s)
     c->readvid = !c->has_sound;
     c->vidpos  = avio_tell(pb);
     s->start_time = 0;
-    s->duration = (int64_t)c->frames * AV_TIME_BASE * num / den;
+    s->duration = av_rescale(c->frames, AV_TIME_BASE * (int64_t)num, den);
     av_log(s, AV_LOG_DEBUG, "%d frame(s)\n",c->frames);
 
     return 0;
@@ -226,7 +226,7 @@ static int dxa_read_packet(AVFormatContext *s, AVPacket *pkt)
     return AVERROR_EOF;
 }
 
-AVInputFormat ff_dxa_demuxer = {
+const AVInputFormat ff_dxa_demuxer = {
     .name           = "dxa",
     .long_name      = NULL_IF_CONFIG_SMALL("DXA"),
     .priv_data_size = sizeof(DXAContext),