guess matroska files frame rate
authorSteve L'Homme <slhomme@divxcorp.com>
Mon, 6 Nov 2006 23:07:54 +0000 (23:07 +0000)
committerAurelien Jacobs <aurel@gnuage.org>
Mon, 6 Nov 2006 23:07:54 +0000 (23:07 +0000)
Patch by Steve Lhomme % slhomme A divxcorp P com %
Original thread:
Date: Mon, 06 Nov 2006 21:28:52 +0100
Subject: [Ffmpeg-devel] [PATCH] Matroska FPS info

Originally committed as revision 6922 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/matroska.c

index ee42392..1cca292 100644 (file)
@@ -2209,6 +2209,10 @@ matroska_read_header (AVFormatContext    *s,
 
             st->codec->codec_id = codec_id;
 
+            if (track->default_duration)
+                av_reduce(&st->codec->time_base.num, &st->codec->time_base.den,
+                          track->default_duration, 1000000000, 30000);
+
             if(extradata){
                 st->codec->extradata = extradata;
                 st->codec->extradata_size = extradata_size;