diff options
author | Stefano Sabatini <stefasab@gmail.com> | 2012-01-17 22:50:12 +0400 |
---|---|---|
committer | Stefano Sabatini <stefasab@gmail.com> | 2012-07-04 01:26:07 +0400 |
commit | d8013f38ab73b15c5041f2489fc0b8bb45512e24 (patch) | |
tree | d5239fd9a0f805192017923e3db0518d75949b21 /libavformat/segment.c | |
parent | a1e092ccd36ef0239749c2267104e7e59ee7176e (diff) |
lavf/segment: add error log in case of invalid filename template
Better rather than silently exit.
Diffstat (limited to 'libavformat/segment.c')
-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) |