[FFmpeg-devel] [PATCH] lavf/segment: fix crash when failing to open segment list

Michael Niedermayer michaelni at gmx.at
Sat Jan 21 22:04:38 EET 2017


On Fri, Jan 20, 2017 at 08:19:24PM -0600, Rodger Combs wrote:
> This happens because segment_end() returns an error, so seg_write_packet
> never proceeds to segment_start(), and seg->avf->pb is never re-set,
> so we crash with a null pb when av_write_trailer flushes the packet
> queue.
> 
> This doesn't seem to be clearly recoverable, so I'm just failing more
> gracefully.
> 
> Repro:
> ffmpeg -i input.ts -f segment -c copy -segment_list /noaxx.m3u8 test-%05d.ts
> 
> (assuming you don't have write access to /)
> ---
>  libavformat/segment.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)

LGTM

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I have often repented speaking, but never of holding my tongue.
-- Xenocrates
-------------- 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-devel/attachments/20170121/36e8a360/attachment.sig>


More information about the ffmpeg-devel mailing list