summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/demuxers/demux_wav.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/demuxers/demux_wav.c b/src/demuxers/demux_wav.c
index f20f326d4..eaa4fb9d8 100644
--- a/src/demuxers/demux_wav.c
+++ b/src/demuxers/demux_wav.c
@@ -22,7 +22,7 @@
* MS WAV File Demuxer by Mike Melanson (melanson@pcisys.net)
* based on WAV specs that are available far and wide
*
- * $Id: demux_wav.c,v 1.60 2004/06/14 19:15:36 hadess Exp $
+ * $Id: demux_wav.c,v 1.61 2005/05/18 09:02:26 hadess Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -121,6 +121,11 @@ static int open_wav_file(demux_wav_t *this) {
this->audio_type = BUF_AUDIO_UNKNOWN;
}
+ if (this->wave->nChannels <= 0) {
+ free (this->wave);
+ return 0;
+ }
+
/* traverse through the chunks to find the 'data' chunk */
this->data_start = this->data_size = 0;
while (this->data_start == 0) {