From 43f5d8a9a218359bf1df78f9fafa814113bc4e83 Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Sat, 17 Jun 2006 16:22:39 +0000 Subject: - really fail to open the FLAC file when there's an error demuxing it CVS patchset: 8049 CVS date: 2006/06/17 16:22:39 --- src/libflac/demux_flac.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/libflac/demux_flac.c b/src/libflac/demux_flac.c index 94cb96c47..a2b85252e 100644 --- a/src/libflac/demux_flac.c +++ b/src/libflac/demux_flac.c @@ -595,8 +595,15 @@ open_plugin (demux_class_t *class_gen, */ this->status = DEMUX_OK; FLAC__seekable_stream_decoder_process_until_end_of_metadata (this->flac_decoder); - - lprintf("Processed file until end of metadata\n"); + + lprintf("Processed file until end of metadata: %s\n", + this->status == DEMUX_OK ? "success" : "failure"); + + if (this->status != DEMUX_OK) { + FLAC__seekable_stream_decoder_delete (this->flac_decoder); + free (this); + return NULL; + } return &this->demux_plugin; } -- cgit v1.2.3