Message ID | 1522386541-16549-1-git-send-email-vdixit@akamai.com |
---|---|
State | New |
Headers | show |
> On 30 Mar 2018, at 13:09, vdixit@akamai.com wrote: > > From: Vishwanath Dixit <vdixit@akamai.com> > > Under error conditions, when the context is null, the application crashes > without this check. > --- > libavformat/hlsenc.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c > index 1dd196f..334720f 100644 > --- a/libavformat/hlsenc.c > +++ b/libavformat/hlsenc.c > @@ -2318,7 +2318,8 @@ static int hls_write_packet(AVFormatContext *s, AVPacket *pkt) > } > > vs->packets_written++; > - ret = ff_write_chained(oc, stream_index, pkt, s, 0); > + if (oc->pb) > + ret = ff_write_chained(oc, stream_index, pkt, s, 0); > > return ret; > } > -- > 1.9.1 > > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel LGTM Thanks Steven
diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index 1dd196f..334720f 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -2318,7 +2318,8 @@ static int hls_write_packet(AVFormatContext *s, AVPacket *pkt) } vs->packets_written++; - ret = ff_write_chained(oc, stream_index, pkt, s, 0); + if (oc->pb) + ret = ff_write_chained(oc, stream_index, pkt, s, 0); return ret; }
From: Vishwanath Dixit <vdixit@akamai.com> Under error conditions, when the context is null, the application crashes without this check. --- libavformat/hlsenc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)