mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
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.
This commit is contained in:
parent
db06f8e9da
commit
04c5a550ad
1 changed files with 2 additions and 0 deletions
|
@ -616,6 +616,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;
|
||||
}
|
||||
|
@ -631,6 +632,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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue