mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-29 22:00:58 +02:00
avformat/hlsenc: Check the return code of avformat_write_header()
Fixes: segfault Fixes: Ticket5067 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
861f47ddf4
commit
c62d1780ff
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user