[FFmpeg-cvslog] avformat/hlsenc: Check the return code of avformat_write_header()
Michael Niedermayer
michaelni at gmx.at
Thu Dec 17 21:54:35 CET 2015
On Sun, Dec 13, 2015 at 07:04:54AM -0500, Ganesh Ajjanagadde wrote:
> On Sat, Dec 12, 2015 at 9:30 PM, Michael Niedermayer <git at videolan.org> wrote:
> > ffmpeg | branch: release/2.8 | Michael Niedermayer <michael at niedermayer.cc> | Sun Dec 13 02:28:13 2015 +0100| [d07f6582018d3388716340b08f1b1461c2f05bda] | 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>
> > (cherry picked from commit c62d1780fff8a1997dd1707bbc557efc8fe41e3c)
> >
> > Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> >
> >> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d07f6582018d3388716340b08f1b1461c2f05bda
> > ---
> >
> > libavformat/hlsenc.c | 7 +++++--
> > 1 file changed, 5 insertions(+), 2 deletions(-)
> >
> > diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
> > index 6827b79..ebc5e11 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;
> > }
> >
> > _______________________________________________
> > ffmpeg-cvslog mailing list
> > ffmpeg-cvslog at ffmpeg.org
> > http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
>
> any reason why we can't use av_warn_unused_result to help for the future here?
it might be a good idea, i dont know
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
The real ebay dictionary, page 2
"100% positive feedback" - "All either got their money back or didnt complain"
"Best seller ever, very honest" - "Seller refunded buyer after failed scam"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-cvslog/attachments/20151217/06d2be0a/attachment.sig>
More information about the ffmpeg-cvslog
mailing list