Commit 32b251dd authored by michael's avatar michael

fix r_frame_rate detection in mpeg4 streams with non integer fps


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@6544 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 4858c6a1
......@@ -1961,10 +1961,15 @@ int av_find_stream_info(AVFormatContext *ic)
}
}
/* if no real frame rate, use the codec one */
if (!st->r_frame_rate.num){
st->r_frame_rate.num = st->codec->time_base.den;
st->r_frame_rate.den = st->codec->time_base.num;
if( st->codec->time_base.den * (int64_t)st->time_base.num
<= st->codec->time_base.num * (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;
}else{
st->r_frame_rate.num = st->time_base.den;
st->r_frame_rate.den = st->time_base.num;
}
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment