aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/hlsenc.c
diff options
context:
space:
mode:
authorStefano Sabatini <stefasab@gmail.com>2012-12-20 10:41:19 +0100
committerStefano Sabatini <stefasab@gmail.com>2012-12-21 00:07:21 +0100
commit340b7caf5457b2988bfd53709a00cedc2fcd73b7 (patch)
treea1ec7ef4b6254d411e341e2b055512167f304b4b /libavformat/hlsenc.c
parent28b96efab509801ed9d81bb84ed42adb9c4de84f (diff)
downloadffmpeg-340b7caf5457b2988bfd53709a00cedc2fcd73b7.tar.gz
lavf/hlsenc: provide some feedback in case of invalid basename
Diffstat (limited to 'libavformat/hlsenc.c')
-rw-r--r--libavformat/hlsenc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index b92a39b246..d5058a1a5e 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -157,8 +157,10 @@ static int hls_start(AVFormatContext *s)
c->number %= c->wrap;
if (av_get_frame_filename(oc->filename, sizeof(oc->filename),
- c->basename, c->number++) < 0)
+ c->basename, c->number++) < 0) {
+ av_log(oc, AV_LOG_ERROR, "Invalid segment filename template '%s'\n", c->basename);
return AVERROR(EINVAL);
+ }
if ((err = avio_open2(&oc->pb, oc->filename, AVIO_FLAG_WRITE,
&s->interrupt_callback, NULL)) < 0)