[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:55:54 PDT 2013


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





--- Comment #8 from Brian Holt <brian.holt at samsung.com>  2013-07-08 09:57:53 PST ---
(In reply to comment #6)
> (From update of attachment 206249 [details])
> 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.

I definitely will in the future.  Thanks for the helpful comments.

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