[Webkit-unassigned] [Bug 118473] [GTK] Leak: GstElement* leaking in MediaPlayerPrivateGStreamer::createAudioSink()

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jul 8 09:53:06 PDT 2013


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





--- Comment #6 from Christophe Dumez <dchris at gmail.com>  2013-07-08 09:55:05 PST ---
(From update of attachment 206249)
View in context: https://bugs.webkit.org/attachment.cgi?id=206249&action=review

>>> Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:1578
>>> +    GRefPtr<GstElement> audioSink = adoptGRef(gst_bin_new("audio-sink"));
>> 
>> The doc says that gst_bin_new() returns a floating reference:
>> http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstBin.html#gst-bin-new
>> 
>> How come adopting doesn't assert here?
>> template <> GRefPtr<GstElement> adoptGRef(GstElement* ptr)
>> {
>>     ASSERT(!ptr || !gstObjectIsFloating(GST_OBJECT(ptr)));
>>     return GRefPtr<GstElement>(ptr, GRefPtrAdopt);
>> }
> 
> Thanks very much for the link - I should have checked first whether gst_bin_new returns a floating reference.
> 
> Regarding the ASSERT, I'm working with a release build so it's ifdef'ed out.

Sometimes to streamer doc is wrong about these things so it should be double checked. Also note that the behaviour is sometimes different between streamer 0.10 and gstreamer 1.0.
It is important that you test with a debug build.

-- 
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