From: =?utf-8?q?Martin_Stegh=C3=B6fer?= <martin@steghoefer.eu>
Date: Wed, 10 Dec 2014 22:28:25 +0100
Subject: Fix ogg123 speex playback: Initialize channel matrix

The speex decoder didn't initialize the channel matrix,
which caused libao to print the cryptic error message
'" in channel matrix ""' and occasionally (depending on
the output device) to abort audio output.

Bug-Debian: https://bugs.debian.org/772766
---
 ogg123/speex_format.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/ogg123/speex_format.c b/ogg123/speex_format.c
index c5a453d..c42e429 100644
--- a/ogg123/speex_format.c
+++ b/ogg123/speex_format.c
@@ -560,7 +560,19 @@ int read_speex_header (decoder_t *decoder)
 
 	  if (!priv->frames_per_packet)
 	    priv->frames_per_packet=1;
-	
+
+      switch(decoder->actual_fmt.channels) {
+      case 1:
+        decoder->actual_fmt.matrix="M";
+        break;
+      case 2:
+        decoder->actual_fmt.matrix="L,R";
+        break;
+      default:
+        decoder->actual_fmt.matrix=NULL;
+        break;
+      }
+
 
 	  priv->output = calloc(priv->frame_size * 
 				decoder->actual_fmt.channels * 
