[FFmpeg-devel] [PATCH] lavf/hlsenc: provide some feedback in case of invalid basename

Clément Bœsch ubitux at gmail.com
Thu Dec 20 16:41:41 CET 2012


On Thu, Dec 20, 2012 at 10:42:03AM +0100, Stefano Sabatini wrote:
> ---
>  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)

Should be OK

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20121220/b894861a/attachment.asc>


More information about the ffmpeg-devel mailing list