diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-12-14 01:36:29 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-12-14 02:12:49 +0100 |
commit | add46edf33a72b5b3d3af3761d7b372d16769911 (patch) | |
tree | 9b89fdff855ac4183c35bb9625fccb5840975044 /libavformat | |
parent | d823edee8d346901ec4f9b31f9abee758b23b5ef (diff) | |
download | ffmpeg-add46edf33a72b5b3d3af3761d7b372d16769911.tar.gz |
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>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/utils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index 80e6be9fce..9328d6b0b7 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -745,7 +745,7 @@ void ff_compute_frame_duration(AVFormatContext *s, int *pnum, int *pden, AVStrea *pden = 0; switch (st->codec->codec_type) { 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; *pden = st->r_frame_rate.num; } else if (st->time_base.num * 1000LL > st->time_base.den) { |