diff options
author | wm4 <nfxjfg@googlemail.com> | 2015-04-20 19:36:51 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-04-20 19:50:58 +0200 |
commit | bac7084fbd372676b6a4c7c1ab487640d4f945de (patch) | |
tree | ed88fd942b1a5cef68cad907a3010b99894d6959 /ffmpeg_opt.c | |
parent | 57865a974780c4427cc5084629c75e4ac1d87a74 (diff) | |
download | ffmpeg-bac7084fbd372676b6a4c7c1ab487640d4f945de.tar.gz |
ffmpeg: add option not to offset seek position by start time
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffmpeg_opt.c')
-rw-r--r-- | ffmpeg_opt.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c index 8f1f35dde2..75c80e792e 100644 --- a/ffmpeg_opt.c +++ b/ffmpeg_opt.c @@ -919,7 +919,7 @@ static int open_input_file(OptionsContext *o, const char *filename) timestamp = (o->start_time == AV_NOPTS_VALUE) ? 0 : o->start_time; /* add the stream start time */ - if (ic->start_time != AV_NOPTS_VALUE) + if (!o->seek_timestamp && ic->start_time != AV_NOPTS_VALUE) timestamp += ic->start_time; /* if seeking requested, we execute it */ @@ -2865,6 +2865,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" }, + { "seek_timestamp", HAS_ARG | OPT_INT | OPT_OFFSET | + OPT_INPUT, { .off = OFFSET(seek_timestamp) }, + "enable/disable seeking by timestamp with -ss" }, { "accurate_seek", OPT_BOOL | OPT_OFFSET | OPT_EXPERT | OPT_INPUT, { .off = OFFSET(accurate_seek) }, "enable/disable accurate seeking with -ss" }, |