ffmpeg: copy tmcd track timebase parameters
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 17 Jan 2013 17:49:46 +0000 (18:49 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 24 Jan 2013 17:37:32 +0000 (18:37 +0100)
Fixes part of Ticket2045

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

index db25f64..6d53edf 100644 (file)
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -2139,6 +2139,12 @@ static int transcode_init(void)
                     codec->time_base.num *= icodec->ticks_per_frame;
                 }
             }
+            if (   codec->codec_tag == AV_RL32("tmcd")
+                && icodec->time_base.num < icodec->time_base.den
+                && icodec->time_base.num > 0
+                && 121LL*icodec->time_base.num > icodec->time_base.den) {
+                codec->time_base = icodec->time_base;
+            }
 
             if(ost->frame_rate.num)
                 codec->time_base = av_inv_q(ost->frame_rate);