From 7d997a77166b94aea43afbbc252f1aa0af00a7fa Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Sat, 9 Jun 2012 17:09:49 +0100 Subject: Double-free with some AAC files (missing check). --- src/libfaad/xine_faad_decoder.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/libfaad/xine_faad_decoder.c b/src/libfaad/xine_faad_decoder.c index 86dc7d6d3..af0c6f967 100644 --- a/src/libfaad/xine_faad_decoder.c +++ b/src/libfaad/xine_faad_decoder.c @@ -249,8 +249,10 @@ static void faad_decode_audio ( faad_decoder_t *this, int end_frame ) { lprintf("faacDecDecode() returned rate=%"PRId32" channels=%d used=%d\n", this->rate, this->num_channels, used); - this->stream->audio_out->close (this->stream->audio_out, this->stream); - this->output_open = 0; + if (this->output_open) { + this->stream->audio_out->close (this->stream->audio_out, this->stream); + this->output_open = 0; + } faad_open_output( this ); faad_meta_info_set( this ); -- cgit v1.2.3