From 1095d4425865777a98b510d7af0816e093c6db23 Mon Sep 17 00:00:00 2001 From: Baptiste Coudurier Date: Mon, 17 May 2010 18:12:58 +0000 Subject: [PATCH] set avg frame rate in mkv demuxer Originally committed as revision 23152 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/matroskadec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index 4e6f375c5f..90356d818b 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -1390,6 +1390,8 @@ static int matroska_read_header(AVFormatContext *s, AVFormatParameters *ap) 255); if (st->codec->codec_id != CODEC_ID_H264) st->need_parsing = AVSTREAM_PARSE_HEADERS; + if (track->default_duration) + 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; st->codec->sample_rate = track->audio.out_samplerate;