X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=ffmpeg_opt.c;h=75c80e792e2847c98a014c61a6bd2f789a15bb01;hb=066b92e91d678f500c64c947d86cd8bf73ee6c61;hp=8f1f35dde2bc82605c7473e3af23cf32912089bd;hpb=57f49fa0edafd82315aa3a409ce1051f7dea6981;p=ffmpeg diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c index 8f1f35dde2b..75c80e792e2 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" },