[FFmpeg-cvslog] avformat/utils: Try to correct the codec_framerate in ff_compute_frame_duration() for the encoding case

Michael Niedermayer git at videolan.org
Thu Oct 16 02:47:15 CEST 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Oct 16 01:48:41 2014 +0200| [004f1c6cf13a7f3b6273d693b256d9d85bbc50bd] | committer: Michael Niedermayer

avformat/utils: Try to correct the codec_framerate in ff_compute_frame_duration() for the encoding case

No testcase where this makes a difference is known

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=004f1c6cf13a7f3b6273d693b256d9d85bbc50bd
---

 libavformat/utils.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/utils.c b/libavformat/utils.c
index 909c7de..a50d6f4 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -712,7 +712,7 @@ void ff_compute_frame_duration(AVFormatContext *s, int *pnum, int *pden, AVStrea
                                AVCodecParserContext *pc, AVPacket *pkt)
 {
     AVRational codec_framerate = s->iformat ? st->codec->framerate :
-                                              av_inv_q(st->codec->time_base);
+                                              av_mul_q(av_inv_q(st->codec->time_base), (AVRational){1, st->codec->ticks_per_frame});
     int frame_size;
 
     *pnum = 0;



More information about the ffmpeg-cvslog mailing list