Revision 0f27e6b4

View differences:

ffmpeg.c
213 213
static int audio_sync_method= 0;
214 214
static float audio_drift_threshold= 0.1;
215 215
static int copy_ts= 0;
216
static int copy_tb;
216 217
static int opt_shortest = 0;
217 218
static int video_global_header = 0;
218 219
static char *vstats_filename;
......
2143 2144
                goto fail;
2144 2145
            memcpy(codec->extradata, icodec->extradata, icodec->extradata_size);
2145 2146
            codec->extradata_size= icodec->extradata_size;
2146
            if(av_q2d(icodec->time_base)*icodec->ticks_per_frame > av_q2d(ist->st->time_base) && av_q2d(ist->st->time_base) < 1.0/1000){
2147
            if(!copy_tb && av_q2d(icodec->time_base)*icodec->ticks_per_frame > av_q2d(ist->st->time_base) && av_q2d(ist->st->time_base) < 1.0/1000){
2147 2148
                codec->time_base = icodec->time_base;
2148 2149
                codec->time_base.num *= icodec->ticks_per_frame;
2149 2150
                av_reduce(&codec->time_base.num, &codec->time_base.den,
......
4214 4215
    { "adrift_threshold", HAS_ARG | OPT_FLOAT | OPT_EXPERT, {(void*)&audio_drift_threshold}, "audio drift threshold", "threshold" },
4215 4216
    { "vglobal", HAS_ARG | OPT_INT | OPT_EXPERT, {(void*)&video_global_header}, "video global header storage type", "" },
4216 4217
    { "copyts", OPT_BOOL | OPT_EXPERT, {(void*)&copy_ts}, "copy timestamps" },
4218
    { "copytb", OPT_BOOL | OPT_EXPERT, {(void*)&copy_tb}, "copy input stream time base when stream copying" },
4217 4219
    { "shortest", OPT_BOOL | OPT_EXPERT, {(void*)&opt_shortest}, "finish encoding within shortest input" }, //
4218 4220
    { "dts_delta_threshold", HAS_ARG | OPT_FLOAT | OPT_EXPERT, {(void*)&dts_delta_threshold}, "timestamp discontinuity delta threshold", "threshold" },
4219 4221
    { "programid", HAS_ARG | OPT_INT | OPT_EXPERT, {(void*)&opt_programid}, "desired program number", "" },

Also available in: Unified diff