diff options
author | Anton Khirnov <anton@khirnov.net> | 2013-06-15 09:59:40 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2013-08-05 10:53:41 +0200 |
commit | 811bd0784679dfcb4ed02043a37c92f9df10500e (patch) | |
tree | 3d64eb21fc159c1862614819bd16adb1ba6aaf6b /avconv_opt.c | |
parent | 56ee3f9de7b9f6090d599a27d33a392890a2f7b8 (diff) | |
download | ffmpeg-811bd0784679dfcb4ed02043a37c92f9df10500e.tar.gz |
avconv: make input -ss accurate when transcoding
Insert (a)trim filters on the corresponding inputs, so the extra frames
are decoded and discarded.
Diffstat (limited to 'avconv_opt.c')
-rw-r--r-- | avconv_opt.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/avconv_opt.c b/avconv_opt.c index c8d917638b..f14d7f1c62 100644 --- a/avconv_opt.c +++ b/avconv_opt.c @@ -117,6 +117,7 @@ static void init_options(OptionsContext *o) o->recording_time = INT64_MAX; 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 */ @@ -687,9 +688,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); @@ -2151,6 +2154,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" }, |