[FFmpeg-devel] [PATCH 1/4] movenc: set timescale for timecode tracks

Jean First jeanfirst at gmail.com
Sat Aug 25 11:44:11 CEST 2012


fix ticket #236

Signed-off-by: Jean First <jeanfirst at gmail.com>
---
 libavformat/movenc.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 695bd43..1cb1853 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -3489,7 +3489,11 @@ static int mov_write_header(AVFormatContext *s)
         }else if(st->codec->codec_type == AVMEDIA_TYPE_SUBTITLE){
             track->timescale = st->codec->time_base.den;
         }else{
-            track->timescale = MOV_TIMESCALE;
+            if (track->enc->codec_tag == MKTAG('t','m','c','d')){
+                track->timescale = st->codec->time_base.den;
+            }else{
+                track->timescale = MOV_TIMESCALE;
+            }
         }
         if (!track->height)
             track->height = st->codec->height;
-- 
1.7.9.4



More information about the ffmpeg-devel mailing list