diff options
author | Stefano Sabatini <stefasab@gmail.com> | 2012-01-17 19:50:12 +0100 |
---|---|---|
committer | Stefano Sabatini <stefasab@gmail.com> | 2012-07-03 23:26:07 +0200 |
commit | d8013f38ab73b15c5041f2489fc0b8bb45512e24 (patch) | |
tree | d5239fd9a0f805192017923e3db0518d75949b21 | |
parent | a1e092ccd36ef0239749c2267104e7e59ee7176e (diff) | |
download | ffmpeg-d8013f38ab73b15c5041f2489fc0b8bb45512e24.tar.gz |
lavf/segment: add error log in case of invalid filename template
Better rather than silently exit.
-rw-r--r-- | libavformat/segment.c | 4 |
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) |