diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2015-12-13 04:28:13 +0300 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2015-12-13 04:28:13 +0300 |
commit | c62d1780fff8a1997dd1707bbc557efc8fe41e3c (patch) | |
tree | 72a7b5aed81e39abc5d0463bc5a622fa13d9f050 /libavformat/hlsenc.c | |
parent | 861f47ddf463926da2cba9e12665e7f004419f4b (diff) |
avformat/hlsenc: Check the return code of avformat_write_header()
Fixes: segfault
Fixes: Ticket5067
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/hlsenc.c')
-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 3181cc7e36..adcf7dfcdd 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -571,8 +571,11 @@ static int hls_start(AVFormatContext *s) av_opt_set(oc->priv_data, "pat_period", period, 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; fail: |