aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2015-07-29 18:58:57 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2015-07-29 18:58:57 +0200
commit0949869e7b8020beb8d9727cc0855c06beb31ae7 (patch)
tree10ff74357888aa8a7a9da98c95955d873c750d73
parent42209eb9554785c3a6e0e864e207e9a7ab05b61f (diff)
downloadffmpeg-0949869e7b8020beb8d9727cc0855c06beb31ae7.tar.gz
ffmpeg_op: Print warning if duration isnt known when -sseof is used
Found-by: ubitux Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--ffmpeg_opt.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c
index 351c47bf42..d912cb02b5 100644
--- a/ffmpeg_opt.c
+++ b/ffmpeg_opt.c
@@ -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)