webrtcdatachannel: take ref of data so it doesn't disappear

This commit is contained in:
Matthew Waters 2018-09-26 16:00:50 +10:00
parent 47b69bca12
commit 8e8eb41ddf

View file

@ -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;
}