speex: Fix segfault when resetting the codecs multiple times

https://bugzilla.gnome.org/show_bug.cgi?id=738793
This commit is contained in:
Ananda 2014-10-22 15:28:44 +02:00 committed by Sebastian Dröge
parent 163155715f
commit ec3af50cc2
2 changed files with 2 additions and 0 deletions

View file

@ -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);

View file

@ -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;