mirror of
https://github.com/librempeg/librempeg
synced 2024-11-23 03:28:27 +00: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