aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-10-16 01:48:41 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-10-16 02:46:02 +0200
commit004f1c6cf13a7f3b6273d693b256d9d85bbc50bd (patch)
tree3a0881fe6ae84dd250cbb74cb27e67376886b1a6
parent46f52274f38d61102bba38961a02b1938003a514 (diff)
downloadffmpeg-004f1c6cf13a7f3b6273d693b256d9d85bbc50bd.tar.gz
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@gmx.at>
-rw-r--r--libavformat/utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 909c7deacc..a50d6f441a 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;