[FFmpeg-cvslog] ffmpeg: remove common factors from copied timebase

Michael Niedermayer git at videolan.org
Wed Jul 9 21:57:09 CEST 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Jul  9 21:48:16 2014 +0200| [9098f0ecd7bfa8e971ab92bd0c244cb003ef43b2] | committer: Michael Niedermayer

ffmpeg: remove common factors from copied timebase

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

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

 ffmpeg.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ffmpeg.c b/ffmpeg.c
index 28ed351..15f2c24 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -2879,7 +2879,8 @@ static int transcode_init(void)
         }
         ost->st->codec->codec= ost->enc_ctx->codec;
 
-        ost->st->time_base = ost->enc_ctx->time_base;
+        // copy timebase while removing common factors
+        ost->st->time_base = av_add_q(ost->enc_ctx->time_base, (AVRational){0});
     }
 
     /* init input streams */



More information about the ffmpeg-cvslog mailing list