Use speex_header_free() to free memory which was allocated by
library. Cross-CRT issue should not happen on 1.17 Cerbero build
but might happen custom build or so.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/606>
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);
/* 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;