1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avformat/hlsenc: Check the return code of avformat_write_header()

Fixes: segfault
Fixes: Ticket5067

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit c62d1780ff)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2015-12-13 02:28:13 +01:00
parent 07b43fb69a
commit d07f658201

View File

@ -548,8 +548,11 @@ static int hls_start(AVFormatContext *s)
if (oc->oformat->priv_class && oc->priv_data)
av_opt_set(oc->priv_data, "mpegts_flags", "resend_headers", 0);
if (c->vtt_basename)
avformat_write_header(vtt_oc,NULL);
if (c->vtt_basename) {
err = avformat_write_header(vtt_oc,NULL);
if (err < 0)
return err;
}
return 0;
}