diff options
Diffstat (limited to 'ext/speex')
-rw-r--r-- | ext/speex/gstspeexdec.c | 2 | ||||
-rw-r--r-- | ext/speex/gstspeexenc.c | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/ext/speex/gstspeexdec.c b/ext/speex/gstspeexdec.c index cc123ce06..f880f818b 100644 --- a/ext/speex/gstspeexdec.c +++ b/ext/speex/gstspeexdec.c @@ -133,7 +133,7 @@ gst_speex_dec_reset (GstSpeexDec * dec) dec->frame_size = 0; dec->frame_duration = 0; dec->mode = NULL; - free (dec->header); + speex_header_free (dec->header); dec->header = NULL; speex_bits_destroy (&dec->bits); speex_bits_set_bit_buffer (&dec->bits, NULL, 0); diff --git a/ext/speex/gstspeexenc.c b/ext/speex/gstspeexenc.c index 4266af63b..496a3a652 100644 --- a/ext/speex/gstspeexenc.c +++ b/ext/speex/gstspeexenc.c @@ -719,7 +719,8 @@ gst_speex_enc_handle_frame (GstAudioEncoder * benc, GstBuffer * buf) /* create header buffer */ data = (guint8 *) speex_header_to_packet (&enc->header, &data_len); - buf1 = gst_buffer_new_wrapped (data, data_len); + buf1 = gst_buffer_new_wrapped_full (0, + data, data_len, 0, data_len, data, (GDestroyNotify) speex_header_free); GST_BUFFER_OFFSET_END (buf1) = 0; GST_BUFFER_OFFSET (buf1) = 0; |