summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Waters <matthew@centricular.com>2018-09-26 16:00:50 +1000
committerMatthew Waters <matthew@centricular.com>2018-09-26 16:01:57 +1000
commit8e8eb41ddfd986b2cce574e0edbd8d2be2e444ce (patch)
tree24f4440681b6e7c4dd0d35e5842dc389c2923bd3
parent47b69bca12665b8510106449c44fc596cc32c4c1 (diff)
webrtcdatachannel: take ref of data so it doesn't disappear
-rw-r--r--ext/webrtc/webrtcdatachannel.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/webrtc/webrtcdatachannel.c b/ext/webrtc/webrtcdatachannel.c
index 2f46ee43e..47263e794 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;
}