[vorbis-tools] 01/02: Fix ogg123 speex stereo playback: Initialize stereo information data structure
Martin Steghöfer
martin.steghoefer-guest at moszumanska.debian.org
Wed Dec 10 21:32:39 UTC 2014
This is an automated email from the git hooks/post-receive script.
martin.steghoefer-guest pushed a commit to branch master
in repository vorbis-tools.
commit fb82b1de29c3cb80367b540b7e6302f1efc3999b
Author: Martin Steghöfer <martin at steghoefer.eu>
Date: Tue Dec 9 23:17:44 2014 +0100
Fix ogg123 speex stereo playback: Initialize stereo information data structure
Closes: #312185
---
...speex-stereo-Initialize-stereo-info-data-.patch | 67 ++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 68 insertions(+)
diff --git a/debian/patches/0011-Fix-ogg123-speex-stereo-Initialize-stereo-info-data-.patch b/debian/patches/0011-Fix-ogg123-speex-stereo-Initialize-stereo-info-data-.patch
new file mode 100644
index 0000000..75f2429
--- /dev/null
+++ b/debian/patches/0011-Fix-ogg123-speex-stereo-Initialize-stereo-info-data-.patch
@@ -0,0 +1,67 @@
+From: =?utf-8?q?Martin_Stegh=C3=B6fer?= <martin at steghoefer.eu>
+Date: Tue, 9 Dec 2014 23:14:08 +0100
+Subject: Fix ogg123 speex stereo: Initialize stereo info data structure
+
+The ogg123 executable wasn't able to correctly play stereo speex
+files that don't contain any inband intensity stereo signals at
+all or whose first inband intensity stereo signal arrives after
+the stream has already started. This was due to the stereo
+information data structure not being initialized properly before
+the first inband intensity stereo signal arrived. So in the
+mentioned cases the speex decoder used uninitialized float
+values for the stereo decoding. This patch fixes the problem by
+using the proper initialization and deallocation functions from
+libspeex.
+
+Bug-Debian: https://bugs.debian.org/312185
+---
+ ogg123/speex_format.c | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+diff --git a/ogg123/speex_format.c b/ogg123/speex_format.c
+index 9aad365..c5a453d 100644
+--- a/ogg123/speex_format.c
++++ b/ogg123/speex_format.c
+@@ -47,7 +47,7 @@ typedef struct speex_private_t {
+ ogg_packet op;
+ ogg_stream_state os;
+ SpeexBits bits;
+- SpeexStereoState stereo;
++ SpeexStereoState *stereo;
+ SpeexHeader *header;
+ void *st;
+
+@@ -142,6 +142,7 @@ decoder_t* speex_init (data_source_t *source, ogg123_options_t *ogg123_opts,
+ private->comment_packet = NULL;
+ private->comment_packet_len = 0;
+ private->header = NULL;
++ private->stereo = speex_stereo_state_init();
+
+ private->stats.total_time = 0.0;
+ private->stats.current_time = 0.0;
+@@ -234,7 +235,7 @@ int speex_read (decoder_t *decoder, void *ptr, int nbytes, int *eos,
+ speex_decode(priv->st, &priv->bits, temp_output);
+
+ if (audio_fmt->channels==2)
+- speex_decode_stereo(temp_output, priv->frame_size, &priv->stereo);
++ speex_decode_stereo(temp_output, priv->frame_size, priv->stereo);
+
+ priv->samples_decoded += priv->frame_size;
+
+@@ -328,6 +329,7 @@ void speex_cleanup (decoder_t *decoder)
+ {
+ speex_private_t *priv = decoder->private;
+
++ speex_stereo_state_destroy(priv->stereo);
+ free(priv->comment_packet);
+ free(priv->output);
+ free(decoder->private);
+@@ -544,7 +546,7 @@ int read_speex_header (decoder_t *decoder)
+ priv->st = process_header(&priv->op,
+ &priv->frame_size,
+ &priv->header,
+- &priv->stereo,
++ priv->stereo,
+ decoder->callbacks,
+ decoder->callback_arg);
+
diff --git a/debian/patches/series b/debian/patches/series
index 8ab4e55..602973a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -8,3 +8,4 @@
0008-Make-it-clear-in-documentation-that-f-needs-a-previo.patch
0009-Fix-oggenc-crash-on-closing-raw-input-files.patch
0010-Truncate-long-status-lines-on-small-terminals.patch
+0011-Fix-ogg123-speex-stereo-Initialize-stereo-info-data-.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-xiph/vorbis-tools.git
More information about the pkg-xiph-commits
mailing list