diff options
author | Anton Khirnov <anton@khirnov.net> | 2013-06-18 11:12:09 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2013-08-05 10:54:19 +0200 |
commit | 488a0fa68973d48e264d54f1722f7afb18afbea7 (patch) | |
tree | 7b7862548be5012cef6405ea48fc45ce5a2e32e3 /avconv_opt.c | |
parent | 811bd0784679dfcb4ed02043a37c92f9df10500e (diff) | |
download | ffmpeg-488a0fa68973d48e264d54f1722f7afb18afbea7.tar.gz |
avconv: support -t as an input option.
It limits the duration of the data read from a given input.
Diffstat (limited to 'avconv_opt.c')
-rw-r--r-- | avconv_opt.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/avconv_opt.c b/avconv_opt.c index f14d7f1c62..bd8e7e5a79 100644 --- a/avconv_opt.c +++ b/avconv_opt.c @@ -689,6 +689,7 @@ 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->recording_time = o->recording_time; f->ts_offset = o->input_ts_offset - (copy_ts ? 0 : timestamp); f->nb_streams = ic->nb_streams; f->rate_emu = o->rate_emu; @@ -2146,7 +2147,8 @@ const OptionDef options[] = { { "map_chapters", HAS_ARG | OPT_INT | OPT_EXPERT | OPT_OFFSET | OPT_OUTPUT, { .off = OFFSET(chapters_input_file) }, "set chapters mapping", "input_file_index" }, - { "t", HAS_ARG | OPT_TIME | OPT_OFFSET | OPT_OUTPUT, { .off = OFFSET(recording_time) }, + { "t", HAS_ARG | OPT_TIME | OPT_OFFSET | + OPT_INPUT | OPT_OUTPUT, { .off = OFFSET(recording_time) }, "record or transcode \"duration\" seconds of audio/video", "duration" }, { "fs", HAS_ARG | OPT_INT64 | OPT_OFFSET | OPT_OUTPUT, { .off = OFFSET(limit_filesize) }, |