[Webkit-unassigned] [Bug 105292] [GStreamer] GstMessage handler in AudioDestination

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Dec 28 06:07:47 PST 2012


https://bugs.webkit.org/show_bug.cgi?id=105292





--- Comment #7 from Martin Robinson <mrobinson at webkit.org>  2012-12-28 06:09:54 PST ---
(From update of attachment 180858)
View in context: https://bugs.webkit.org/attachment.cgi?id=180858&action=review

Oops! I think I miscommunicated. g_warning and g_debug are probably okay since you can control them with the G_DEBUG environment variable. On the other hand I think that the GstBus that you get from gst_pipeline_get_bus are still leaking in this patch.

> Source/WebCore/platform/audio/gstreamer/AudioDestinationGStreamer.cpp:68
> +    GRefPtr<GstBus> bus = gst_pipeline_get_bus(GST_PIPELINE(m_pipeline));
> +    gst_bus_add_signal_watch(bus.get());
> +    g_signal_connect(bus.get(), "message", G_CALLBACK(messageCallback), this);

If gst_pipeline_get_bus doesn't return a new reference you can use a raw pointer. If it does, you should use adoptRef. The documentation says "transfer full" so I think this needs to be adopted.

> Source/WebCore/platform/audio/gstreamer/AudioDestinationGStreamer.cpp:91
> +    GRefPtr<GstBus> bus = gst_pipeline_get_bus(GST_PIPELINE(m_pipeline));
> +    g_signal_handlers_disconnect_by_func(bus.get(), reinterpret_cast<gpointer>(messageCallback), this);

Ditto.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list