diff options
author | Ananda <ananda@latelier23.com> | 2014-10-22 15:28:44 +0200 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2014-10-24 20:52:44 +0100 |
commit | 65acd83a864e7ae05f86a64c5b865f95bf8778e7 (patch) | |
tree | 79e8e3bb95ce3edab5ff68872aafc9eb3c229330 | |
parent | 892e17968c9d7bc2322a3130cdb64c73cfd0e402 (diff) |
speex: Fix segfault when resetting the codecs multiple times
https://bugzilla.gnome.org/show_bug.cgi?id=738793
-rw-r--r-- | ext/speex/gstspeexdec.c | 1 | ||||
-rw-r--r-- | ext/speex/gstspeexenc.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/ext/speex/gstspeexdec.c b/ext/speex/gstspeexdec.c index 9b62ebe72..587255d7b 100644 --- a/ext/speex/gstspeexdec.c +++ b/ext/speex/gstspeexdec.c @@ -136,6 +136,7 @@ gst_speex_dec_reset (GstSpeexDec * dec) free (dec->header); dec->header = NULL; speex_bits_destroy (&dec->bits); + speex_bits_set_bit_buffer (&dec->bits, NULL, 0); gst_buffer_replace (&dec->streamheader, NULL); gst_buffer_replace (&dec->vorbiscomment, NULL); diff --git a/ext/speex/gstspeexenc.c b/ext/speex/gstspeexenc.c index 8e13eb1c2..9a2888d60 100644 --- a/ext/speex/gstspeexenc.c +++ b/ext/speex/gstspeexenc.c @@ -269,6 +269,7 @@ gst_speex_enc_stop (GstAudioEncoder * benc) enc->state = NULL; } speex_bits_destroy (&enc->bits); + speex_bits_set_bit_buffer (&enc->bits, NULL, 0); gst_tag_list_unref (enc->tags); enc->tags = NULL; |