From 8e8eb41ddfd986b2cce574e0edbd8d2be2e444ce Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Wed, 26 Sep 2018 16:00:50 +1000 Subject: [PATCH] webrtcdatachannel: take ref of data so it doesn't disappear --- ext/webrtc/webrtcdatachannel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/webrtc/webrtcdatachannel.c b/ext/webrtc/webrtcdatachannel.c index 2f46ee43e5..47263e794b 100644 --- a/ext/webrtc/webrtcdatachannel.c +++ b/ext/webrtc/webrtcdatachannel.c @@ -808,7 +808,7 @@ gst_webrtc_data_channel_send_data (GstWebRTCDataChannel * channel, } buffer = gst_buffer_new_wrapped_full (GST_MEMORY_FLAG_READONLY, data, size, - 0, size, bytes, (GDestroyNotify) g_bytes_unref); + 0, size, g_bytes_ref (bytes), (GDestroyNotify) g_bytes_unref); ppid = DATA_CHANNEL_PPID_WEBRTC_BINARY; }