[Webkit-unassigned] [Bug 79795] Unreleased gst_object_reference to audio sink in MediaPlayerPrivateGStreamer

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Feb 29 09:12:04 PST 2012


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





--- Comment #12 from Martin Robinson <mrobinson at webkit.org>  2012-02-29 09:11:54 PST ---
(In reply to comment #11)
> OK, got it: thanks for the link. I had missed the different constructor used when calling adoptGRef ("Adopting constructor").
> 
> How about that, then:
> 
>     GRefPtr<GstElement> m_webkitAudioSink;
> ...
> 
>     GstElement* sinkPtr = 0;
> 
>     g_object_get(m_playBin, "audio-sink", &sinkPtr, NULL);
> 
>     m_webkitAudioSink= adoptGRef(sinkPtr);
> 
> And that's it: no need for explicit call to gst_unref in the destructor.

Looks great.

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