mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-04-24 17:12:34 +02:00
avformat/utils: use r_frame_rate only in the demuxer for ff_compute_frame_duration()
This is primarly to maintain current behavior when r_frame_rate is set for muxers and could be reverted if it has some advantage Fixes Ticket3629 part1 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
d823edee8d
commit
add46edf33
@ -745,7 +745,7 @@ void ff_compute_frame_duration(AVFormatContext *s, int *pnum, int *pden, AVStrea
|
|||||||
*pden = 0;
|
*pden = 0;
|
||||||
switch (st->codec->codec_type) {
|
switch (st->codec->codec_type) {
|
||||||
case AVMEDIA_TYPE_VIDEO:
|
case AVMEDIA_TYPE_VIDEO:
|
||||||
if (st->r_frame_rate.num && !pc) {
|
if (st->r_frame_rate.num && !pc && s->iformat) {
|
||||||
*pnum = st->r_frame_rate.den;
|
*pnum = st->r_frame_rate.den;
|
||||||
*pden = st->r_frame_rate.num;
|
*pden = st->r_frame_rate.num;
|
||||||
} else if (st->time_base.num * 1000LL > st->time_base.den) {
|
} else if (st->time_base.num * 1000LL > st->time_base.den) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user