[FFmpeg-devel] [PATCH] lavf/hlsenc: provide some feedback in case of invalid basename
Stefano Sabatini
stefasab at gmail.com
Thu Dec 20 10:42:03 CET 2012
---
libavformat/hlsenc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index b92a39b..d5058a1 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)
--
1.7.9.5
More information about the ffmpeg-devel
mailing list