aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2011-11-28 21:57:06 +0100
committerAnton Khirnov <anton@khirnov.net>2012-02-26 19:32:33 +0100
commit7929e22bdea3bc40735d31ed7ddbf047732c3b9f (patch)
tree9cd0f23c40aa6f493e624f434377b616944d9c91 /libavformat
parent13f6917ca91dfdc0fd785235b2dae891a9604859 (diff)
downloadffmpeg-7929e22bdea3bc40735d31ed7ddbf047732c3b9f.tar.gz
lavf: don't guess r_frame_rate from either stream or codec timebase.
Neither of those is guaranteed to be connected to framerate in any way (if it even exists). Fixes bug 56.
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/utils.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 11fd3891bc..0f9c8b6293 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -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);