mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-19 20:46:22 +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;
|
ret = GST_FLOW_ERROR;
|
||||||
} else {
|
} else {
|
||||||
ret = _parse_control_packet (channel, info.data, info.size, error);
|
ret = _parse_control_packet (channel, info.data, info.size, error);
|
||||||
|
gst_buffer_unmap (buffer, &info);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -631,6 +632,7 @@ _data_channel_have_sample (GstWebRTCDataChannel * channel, GstSample * sample,
|
||||||
gchar *str = g_strndup ((gchar *) info.data, info.size);
|
gchar *str = g_strndup ((gchar *) info.data, info.size);
|
||||||
_channel_enqueue_task (channel, (ChannelTask) _emit_have_string, str,
|
_channel_enqueue_task (channel, (ChannelTask) _emit_have_string, str,
|
||||||
g_free);
|
g_free);
|
||||||
|
gst_buffer_unmap (buffer, &info);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue