[FFmpeg-cvslog] avformat/utils: use r_frame_rate only in the demuxer for ff_compute_frame_duration()
Michael Niedermayer
git at videolan.org
Sun Dec 14 02:22:43 CET 2014
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Dec 14 01:36:29 2014 +0100| [add46edf33a72b5b3d3af3761d7b372d16769911] | committer: Michael Niedermayer
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 at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=add46edf33a72b5b3d3af3761d7b372d16769911
---
libavformat/utils.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 80e6be9..9328d6b 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) {
More information about the ffmpeg-cvslog
mailing list