segment: Fix the failure paths
authorLuca Barbato <lu_zero@gentoo.org>
Mon, 5 Jan 2015 09:40:41 +0000 (10:40 +0100)
committerLuca Barbato <lu_zero@gentoo.org>
Wed, 7 Jan 2015 11:36:28 +0000 (12:36 +0100)
commitb3f04657368a32a9903406395f865e230b1de348
treee80c90201dbb9e2f0ac0b69b9fc45a0af194559e
parent8a3d9ca603f4d15ecaa9ca379cbaab4ecaec8ce4
segment: Fix the failure paths

A failure in segment_end() or segment_start() would lead to freeing
a dangling pointer and in general further calls to seg_write_packet()
or to seg_write_trailer() would have the same faulty behaviour.

CC: libav-stable@libav.org
Reported-By: luodalongde@gmail.com
libavformat/segment.c