Commit c62d1780 authored by Michael Niedermayer's avatar Michael Niedermayer

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

Fixes: segfault
Fixes: Ticket5067
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 861f47dd
...@@ -571,8 +571,11 @@ static int hls_start(AVFormatContext *s) ...@@ -571,8 +571,11 @@ static int hls_start(AVFormatContext *s)
av_opt_set(oc->priv_data, "pat_period", period, 0); av_opt_set(oc->priv_data, "pat_period", period, 0);
} }
if (c->vtt_basename) if (c->vtt_basename) {
avformat_write_header(vtt_oc,NULL); err = avformat_write_header(vtt_oc,NULL);
if (err < 0)
return err;
}
return 0; return 0;
fail: fail:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment