mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-10 17:35:59 +00:00
webrtc: Fix memory leak in icestream
Since both g_value_set_object() and g_weak_ref_get() takes a reference there will be two new references to the GstWebRTCICE object when there should be only one. g_value_take_object() has the same functionality as g_value_set_object() but does not take a reference. Without this change, the GstWebRTCICE object will be leaked. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2333>
This commit is contained in:
parent
9cd6f9d51e
commit
26263c194e
1 changed files with 1 additions and 1 deletions
|
@ -83,7 +83,7 @@ gst_webrtc_ice_stream_get_property (GObject * object, guint prop_id,
|
|||
|
||||
switch (prop_id) {
|
||||
case PROP_ICE:
|
||||
g_value_set_object (value, g_weak_ref_get (&stream->ice_weak));
|
||||
g_value_take_object (value, g_weak_ref_get (&stream->ice_weak));
|
||||
break;
|
||||
case PROP_STREAM_ID:
|
||||
g_value_set_uint (value, stream->stream_id);
|
||||
|
|
Loading…
Reference in a new issue