Browse code

avconv: make copy_tb on by default.

I.e. on streamcopy set output codec timebase from input stream timebase
(as opposed to input codec timebase). This should be more sane, because
since the stream is not decoded, the input codec tb has no relation to
the timestamps of the copied packets.

Anton Khirnov authored on 2011/11/29 19:10:31
Showing 1 changed files
... ...
@@ -113,7 +113,7 @@ static int video_sync_method= -1;
113 113
 static int audio_sync_method= 0;
114 114
 static float audio_drift_threshold= 0.1;
115 115
 static int copy_ts= 0;
116
-static int copy_tb;
116
+static int copy_tb = 1;
117 117
 static int opt_shortest = 0;
118 118
 static char *vstats_filename;
119 119
 static FILE *vstats_file;
... ...
@@ -2067,9 +2067,7 @@ static int transcode_init(OutputFile *output_files,
2067 2067
             }
2068 2068
             memcpy(codec->extradata, icodec->extradata, icodec->extradata_size);
2069 2069
             codec->extradata_size = icodec->extradata_size;
2070
-            if (!copy_tb &&
2071
-                av_q2d(icodec->time_base)*icodec->ticks_per_frame > av_q2d(ist->st->time_base) &&
2072
-                av_q2d(ist->st->time_base) < 1.0/500) {
2070
+            if (!copy_tb) {
2073 2071
                 codec->time_base      = icodec->time_base;
2074 2072
                 codec->time_base.num *= icodec->ticks_per_frame;
2075 2073
                 av_reduce(&codec->time_base.num, &codec->time_base.den,