1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-09-28 16:02:17 +02:00

ffmpeg_op: Print warning if duration isnt known when -sseof is used

Found-by: ubitux
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2015-07-29 18:58:57 +02:00
parent 42209eb955
commit 0949869e7b

View File

@ -934,8 +934,12 @@ static int open_input_file(OptionsContext *o, const char *filename)
}
}
if (o->start_time_eof != AV_NOPTS_VALUE && ic->duration>0)
o->start_time = o->start_time_eof + ic->duration;
if (o->start_time_eof != AV_NOPTS_VALUE) {
if (ic->duration>0) {
o->start_time = o->start_time_eof + ic->duration;
} else
av_log(NULL, AV_LOG_WARNING, "Cannot use -sseof, duration of %s not known\n", filename);
}
timestamp = (o->start_time == AV_NOPTS_VALUE) ? 0 : o->start_time;
/* add the stream start time */
if (!o->seek_timestamp && ic->start_time != AV_NOPTS_VALUE)