mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
souphttpsink: Fix refcounting of the "session" property
Properties should never take ownership of the values passed to them.
This commit is contained in:
parent
0672232b26
commit
e376913fc3
1 changed files with 5 additions and 2 deletions
|
@ -249,7 +249,7 @@ gst_soup_http_sink_set_property (GObject * object, guint property_id,
|
||||||
if (souphttpsink->prop_session) {
|
if (souphttpsink->prop_session) {
|
||||||
g_object_unref (souphttpsink->prop_session);
|
g_object_unref (souphttpsink->prop_session);
|
||||||
}
|
}
|
||||||
souphttpsink->prop_session = g_value_get_object (value);
|
souphttpsink->prop_session = g_value_dup_object (value);
|
||||||
break;
|
break;
|
||||||
case PROP_LOCATION:
|
case PROP_LOCATION:
|
||||||
g_free (souphttpsink->location);
|
g_free (souphttpsink->location);
|
||||||
|
@ -327,9 +327,12 @@ gst_soup_http_sink_get_property (GObject * object, guint property_id,
|
||||||
void
|
void
|
||||||
gst_soup_http_sink_dispose (GObject * object)
|
gst_soup_http_sink_dispose (GObject * object)
|
||||||
{
|
{
|
||||||
/* GstSoupHttpSink *souphttpsink = GST_SOUP_HTTP_SINK (object); */
|
GstSoupHttpSink *souphttpsink = GST_SOUP_HTTP_SINK (object);
|
||||||
|
|
||||||
/* clean up as possible. may be called multiple times */
|
/* clean up as possible. may be called multiple times */
|
||||||
|
if (souphttpsink->prop_session)
|
||||||
|
g_object_unref (souphttpsink->prop_session);
|
||||||
|
souphttpsink->prop_session = NULL;
|
||||||
|
|
||||||
G_OBJECT_CLASS (parent_class)->dispose (object);
|
G_OBJECT_CLASS (parent_class)->dispose (object);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue