]> git.sesse.net Git - ffmpeg/commitdiff
lavf: don't guess r_frame_rate from either stream or codec timebase.
authorAnton Khirnov <anton@khirnov.net>
Mon, 28 Nov 2011 20:57:06 +0000 (21:57 +0100)
committerAnton Khirnov <anton@khirnov.net>
Sun, 26 Feb 2012 18:32:33 +0000 (19:32 +0100)
Neither of those is guaranteed to be connected to framerate in any way
(if it even exists).

Fixes bug 56.

libavformat/utils.c
tests/ref/fate/vc1-ism

index 11fd3891bca7c4161bbf7e769cb6465bbcd5c29c..0f9c8b62934be115297ba8536ee89b4afb34c8be 100644 (file)
@@ -2390,17 +2390,6 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
                 if (num && (!st->r_frame_rate.num || (double)num/(12*1001) < 1.01 * av_q2d(st->r_frame_rate)))
                     av_reduce(&st->r_frame_rate.num, &st->r_frame_rate.den, num, 12*1001, INT_MAX);
             }
-
-            if (!st->r_frame_rate.num){
-                if(    st->codec->time_base.den * (int64_t)st->time_base.num
-                    <= st->codec->time_base.num * st->codec->ticks_per_frame * (int64_t)st->time_base.den){
-                    st->r_frame_rate.num = st->codec->time_base.den;
-                    st->r_frame_rate.den = st->codec->time_base.num * st->codec->ticks_per_frame;
-                }else{
-                    st->r_frame_rate.num = st->time_base.den;
-                    st->r_frame_rate.den = st->time_base.num;
-                }
-            }
         }else if(st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
             if(!st->codec->bits_per_coded_sample)
                 st->codec->bits_per_coded_sample= av_get_bits_per_sample(st->codec->codec_id);
index e8117ac423c20cf3c3173d8b9a0144decec01bb1..a9cfb2c5d54bea156d26c80287603a69a29b8ecb 100644 (file)
 0,   48750000,   48750000,        0,    37440, 0xf0fe8c1c
 0,   49170000,   49170000,        0,    37440, 0xc0036222
 0,   49590000,   49590000,        0,    37440, 0x3058385c
-0,   50006672,   50006672,        0,    37440, 0x68141016
+0,   49798332,   49798332,        0,    37440, 0x68141016