[FFmpeg-cvslog] avformat/hlsenc: Check the return code of avformat_write_header()
Michael Niedermayer
git at videolan.org
Sun Dec 13 02:56:24 CET 2015
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Sun Dec 13 02:28:13 2015 +0100| [c62d1780fff8a1997dd1707bbc557efc8fe41e3c] | committer: Michael Niedermayer
avformat/hlsenc: Check the return code of avformat_write_header()
Fixes: segfault
Fixes: Ticket5067
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c62d1780fff8a1997dd1707bbc557efc8fe41e3c
---
libavformat/hlsenc.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index 3181cc7..adcf7df 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:
More information about the ffmpeg-cvslog
mailing list