ffmpeg: remove common factors from copied timebase
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 9 Jul 2014 19:48:16 +0000 (21:48 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 9 Jul 2014 19:51:31 +0000 (21:51 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
ffmpeg.c

index 28ed351..15f2c24 100644 (file)
--- 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 */