aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefano Sabatini <stefasab@gmail.com>2012-01-17 19:50:12 +0100
committerStefano Sabatini <stefasab@gmail.com>2012-07-03 23:26:07 +0200
commitd8013f38ab73b15c5041f2489fc0b8bb45512e24 (patch)
treed5239fd9a0f805192017923e3db0518d75949b21
parenta1e092ccd36ef0239749c2267104e7e59ee7176e (diff)
downloadffmpeg-d8013f38ab73b15c5041f2489fc0b8bb45512e24.tar.gz
lavf/segment: add error log in case of invalid filename template
Better rather than silently exit.
-rw-r--r--libavformat/segment.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/segment.c b/libavformat/segment.c
index 32128269f8..e98f9b4090 100644
--- a/libavformat/segment.c
+++ b/libavformat/segment.c
@@ -54,8 +54,10 @@ static int segment_start(AVFormatContext *s)
seg->number %= seg->wrap;
if (av_get_frame_filename(oc->filename, sizeof(oc->filename),
- s->filename, seg->number++) < 0)
+ s->filename, seg->number++) < 0) {
+ av_log(oc, AV_LOG_ERROR, "Invalid segment filename template '%s'\n", s->filename);
return AVERROR(EINVAL);
+ }
if ((err = avio_open2(&oc->pb, oc->filename, AVIO_FLAG_WRITE,
&s->interrupt_callback, NULL)) < 0)