qi: Fix 'rootdir' value, include post-install from proper location
[dragora.git] / patches / vorbis-tools / 0012-Fix-ogg123-speex-playback-Initialize-channel-matrix.patch
blobad354bd68518b79de18aba353a57b9de699ce3e8
1 From: =?utf-8?q?Martin_Stegh=C3=B6fer?= <martin@steghoefer.eu>
2 Date: Wed, 10 Dec 2014 22:28:25 +0100
3 Subject: Fix ogg123 speex playback: Initialize channel matrix
5 The speex decoder didn't initialize the channel matrix,
6 which caused libao to print the cryptic error message
7 '" in channel matrix ""' and occasionally (depending on
8 the output device) to abort audio output.
10 Bug-Debian: https://bugs.debian.org/772766
11 ---
12 ogg123/speex_format.c | 14 +++++++++++++-
13 1 file changed, 13 insertions(+), 1 deletion(-)
15 diff --git a/ogg123/speex_format.c b/ogg123/speex_format.c
16 index c5a453d..c42e429 100644
17 --- a/ogg123/speex_format.c
18 +++ b/ogg123/speex_format.c
19 @@ -560,7 +560,19 @@ int read_speex_header (decoder_t *decoder)
21 if (!priv->frames_per_packet)
22 priv->frames_per_packet=1;
25 + switch(decoder->actual_fmt.channels) {
26 + case 1:
27 + decoder->actual_fmt.matrix="M";
28 + break;
29 + case 2:
30 + decoder->actual_fmt.matrix="L,R";
31 + break;
32 + default:
33 + decoder->actual_fmt.matrix=NULL;
34 + break;
35 + }
38 priv->output = calloc(priv->frame_size *
39 decoder->actual_fmt.channels *