diff options
Diffstat (limited to 'ffmpeg_opt.c')
-rw-r--r-- | ffmpeg_opt.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c index 65f3df92f9..07ad8190a8 100644 --- a/ffmpeg_opt.c +++ b/ffmpeg_opt.c @@ -150,6 +150,7 @@ static void init_options(OptionsContext *o, int is_input) o->start_time = AV_NOPTS_VALUE; o->limit_filesize = UINT64_MAX; o->chapters_input_file = INT_MAX; + o->accurate_seek = 1; } /* return a copy of the input with the stream specifiers removed from the keys */ @@ -853,9 +854,11 @@ static int open_input_file(OptionsContext *o, const char *filename) f->ctx = ic; f->ist_index = nb_input_streams - ic->nb_streams; + f->start_time = o->start_time; f->ts_offset = o->input_ts_offset - (copy_ts ? 0 : timestamp); f->nb_streams = ic->nb_streams; f->rate_emu = o->rate_emu; + f->accurate_seek = o->accurate_seek; /* check if all codec options have been used */ unused_opts = strip_specifiers(o->g->codec_opts); @@ -2619,6 +2622,9 @@ const OptionDef options[] = { { "ss", HAS_ARG | OPT_TIME | OPT_OFFSET | OPT_INPUT | OPT_OUTPUT, { .off = OFFSET(start_time) }, "set the start time offset", "time_off" }, + { "accurate_seek", OPT_BOOL | OPT_OFFSET | OPT_EXPERT | + OPT_INPUT, { .off = OFFSET(accurate_seek) }, + "enable/disable accurate seeking with -ss" }, { "itsoffset", HAS_ARG | OPT_TIME | OPT_OFFSET | OPT_EXPERT | OPT_INPUT, { .off = OFFSET(input_ts_offset) }, "set the input ts offset", "time_off" }, |