diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2015-12-13 02:28:13 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2015-12-13 02:59:32 +0100 |
commit | d07f6582018d3388716340b08f1b1461c2f05bda (patch) | |
tree | af9e2742816664adb6797d44d36ee82e596ecc96 | |
parent | 07b43fb69afdcd091af7fd32228c2608fd4821cb (diff) | |
download | ffmpeg-d07f6582018d3388716340b08f1b1461c2f05bda.tar.gz |
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 c62d1780fff8a1997dd1707bbc557efc8fe41e3c)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavformat/hlsenc.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index 6827b796f4..ebc5e1117b 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -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; } |