summaryrefslogtreecommitdiff
path: root/libavformat/matroskadec.c
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2012-04-17 15:47:22 -0700
committerLuca Barbato <lu_zero@gentoo.org>2012-04-17 15:47:22 -0700
commit204bcdf56c8f7dae5c487ab0da5c647154f0cd2a (patch)
treeb84ad5494e7c61e1b6e06a347b7e8cd10b79240c /libavformat/matroskadec.c
parentdf8d5eaa14ab584695d190b15aeec210b60913c5 (diff)
mkv: report average framerate as minimal as well
This is in line with other demuxers and overall seems more correct than assuming codec time base.
Diffstat (limited to 'libavformat/matroskadec.c')
-rw-r--r--libavformat/matroskadec.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index c32a943a95..8323601091 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -1551,6 +1551,7 @@ static int matroska_read_header(AVFormatContext *s)
if (st->codec->codec_id != CODEC_ID_H264)
st->need_parsing = AVSTREAM_PARSE_HEADERS;
if (track->default_duration)
+ st->r_frame_rate =
st->avg_frame_rate = av_d2q(1000000000.0/track->default_duration, INT_MAX);
} else if (track->type == MATROSKA_TRACK_TYPE_AUDIO) {
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;