wav: Only create wav header if there is output available.
authorAndre Noll <maan@systemlinux.org>
Sun, 30 Nov 2008 14:13:35 +0000 (15:13 +0100)
committerAndre Noll <maan@systemlinux.org>
Sun, 30 Nov 2008 14:13:35 +0000 (15:13 +0100)
commit1be5197226174d8e8ffdab8ac89fca0b4f8d601b
tree11ac94d5a874c6092b080b49c8094dd365a4aa22
parent500da9ffa2c5ed9d51ea0b908103489d88c97757
wav: Only create wav header if there is output available.

Due to recent changes to filter_chain.c, the convert functions of all
activated filters are called even if there is no output availabe since
the ogg vorbis decoder needs this.

However, this change broke the wav filter: wav_convert() is now called
even if the previous filter (e.g. oggdec) has not yet determined the
format of the input stream.

This caused the wav filter to write out an invalid wav header with 0
channels. Fix it by not doing anything unless wav_convert() gets called
with non-empty input.
wav.c