summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libfaad/xine_faad_decoder.c6
1 files changed, 4 insertions, 2 deletions
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 );