diff options
author | Bastien Nocera <hadess@users.sourceforge.net> | 2006-06-17 16:22:39 +0000 |
---|---|---|
committer | Bastien Nocera <hadess@users.sourceforge.net> | 2006-06-17 16:22:39 +0000 |
commit | 43f5d8a9a218359bf1df78f9fafa814113bc4e83 (patch) | |
tree | 9d5d458a47639bf778ddcadc2692fff9b5b2e8f2 | |
parent | 31eee779c6802eb127e5a529410a61b719a30694 (diff) | |
download | xine-lib-43f5d8a9a218359bf1df78f9fafa814113bc4e83.tar.gz xine-lib-43f5d8a9a218359bf1df78f9fafa814113bc4e83.tar.bz2 |
- 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
-rw-r--r-- | src/libflac/demux_flac.c | 11 |
1 files 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; } |