diff --git a/ext/speex/gstspeexdec.c b/ext/speex/gstspeexdec.c
index 9b62ebe..9201153 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);
+  dec->bits.owner = 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 fce0796..4a38de1 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);
+  enc->bits.owner = 0;
   gst_tag_list_unref (enc->tags);
   enc->tags = NULL;
 
