summaryrefslogtreecommitdiff
path: root/ffmpeg_opt.c
diff options
context:
space:
mode:
authorwm4 <nfxjfg@googlemail.com>2015-04-20 19:36:51 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-04-20 19:50:58 +0200
commitbac7084fbd372676b6a4c7c1ab487640d4f945de (patch)
treeed88fd942b1a5cef68cad907a3010b99894d6959 /ffmpeg_opt.c
parent57865a974780c4427cc5084629c75e4ac1d87a74 (diff)
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.c5
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" },