diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index ca42b444b1..76a7eef012 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -241,7 +241,7 @@ static int hls_write_header(AVFormatContext *s) goto fail; if ((ret = avformat_write_header(hls->avf, NULL)) < 0) - return ret; + goto fail; fail: