diff options
-rw-r--r-- | src/libflac/decoder_flac.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libflac/decoder_flac.c b/src/libflac/decoder_flac.c index a568e27e3..b62286eaa 100644 --- a/src/libflac/decoder_flac.c +++ b/src/libflac/decoder_flac.c @@ -355,7 +355,10 @@ open_plugin (audio_decoder_class_t *class_gen, xine_stream_t *stream) { FLAC__stream_decoder_set_client_data (this->flac_decoder, this); - FLAC__stream_decoder_init (this->flac_decoder); + if (FLAC__stream_decoder_init (this->flac_decoder) == FLAC__STREAM_DECODER_SEARCH_FOR_METADATA) { + free (this); + return NULL; + } return (audio_decoder_t *) this; } |