mirror of
https://git.videolan.org/git/ffmpeg.git
synced 2024-09-03 23:11:29 +02:00
avformat/demux: Use r_frame_rate in compute_frame_duration if codec_framerate is unknown
Signed-off-by: Nicolas Gaullier <nicolas.gaullier@cji.paris> Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
parent
fad459b5a6
commit
daf04868d8
@ -653,7 +653,7 @@ static void compute_frame_duration(AVFormatContext *s, int *pnum, int *pden,
|
||||
*pden = 0;
|
||||
switch (st->codecpar->codec_type) {
|
||||
case AVMEDIA_TYPE_VIDEO:
|
||||
if (st->r_frame_rate.num && !pc) {
|
||||
if (st->r_frame_rate.num && (!pc || !codec_framerate.num)) {
|
||||
*pnum = st->r_frame_rate.den;
|
||||
*pden = st->r_frame_rate.num;
|
||||
} else if (st->time_base.num * 1000LL > st->time_base.den) {
|
||||
|
Loading…
Reference in New Issue
Block a user