summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2020-01-07 20:17:12 +0200
committerTim-Philipp Müller <tim@centricular.com>2020-01-08 23:29:09 +0000
commit8de8a8dc7fe728d260d50286df37715a2a9c0729 (patch)
tree06a76f2456123093bc404420e40f23faa579f74a
parent2c67d0d2f05a1dd6f3c9b6c0c7a387d738117052 (diff)
downloadgstreamer-plugins-bad-8de8a8dc7fe728d260d50286df37715a2a9c0729.tar.gz
webrtc: Unmap all non-binary buffers received via the datachannel
Previously they were only unmapped in case of binary data, causing all of them to be leaked.
-rw-r--r--ext/webrtc/webrtcdatachannel.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/webrtc/webrtcdatachannel.c b/ext/webrtc/webrtcdatachannel.c
index 7aee40379..352a36a1d 100644
--- a/ext/webrtc/webrtcdatachannel.c
+++ b/ext/webrtc/webrtcdatachannel.c
@@ -610,6 +610,7 @@ _data_channel_have_sample (GstWebRTCDataChannel * channel, GstSample * sample,
ret = GST_FLOW_ERROR;
} else {
ret = _parse_control_packet (channel, info.data, info.size, error);
+ gst_buffer_unmap (buffer, &info);
}
break;
}
@@ -625,6 +626,7 @@ _data_channel_have_sample (GstWebRTCDataChannel * channel, GstSample * sample,
gchar *str = g_strndup ((gchar *) info.data, info.size);
_channel_enqueue_task (channel, (ChannelTask) _emit_have_string, str,
g_free);
+ gst_buffer_unmap (buffer, &info);
}
break;
}