[Webkit-unassigned] [Bug 140119] [GStreamer][MSE] ASSERT in MediaSourceClientGStreamer::addSourceBuffer
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Jan 8 02:22:27 PST 2015
https://bugs.webkit.org/show_bug.cgi?id=140119
--- Comment #8 from Carlos Garcia Campos <cgarcia at igalia.com> ---
Comment on attachment 244052
--> https://bugs.webkit.org/attachment.cgi?id=244052
patch
View in context: https://bugs.webkit.org/attachment.cgi?id=244052&action=review
> Source/WebCore/platform/graphics/gstreamer/WebKitMediaSourceGStreamer.cpp:-341
> - GRefPtr<GstPad> ghostPad = adoptGRef(gst_ghost_pad_new_from_template(padName.get(), pad.get(),
> - gst_static_pad_template_get(&srcTemplate)));
I think the actual bug here was that you were adopting a floating reference.
> Source/WebCore/platform/graphics/gstreamer/WebKitMediaSourceGStreamer.cpp:340
> + GstPad* ghostPad = webkitGstGhostPadFromStaticTemplate(&srcTemplate, padName.get(), pad.get());
What's the difference between gst_ghost_pad_new_from_template and webkitGstGhostPadFromStaticTemplate? is this change unrelated to the fix?
> Source/WebCore/platform/graphics/gstreamer/WebKitMediaSourceGStreamer.cpp:343
> + gst_element_add_pad(GST_ELEMENT(m_src.get()), ghostPad);
This consumes the floating reference, so you could either use a raw pointer or keep the smart pointer but without adopting the floating ref. the good thing of using a smart pointer is that if at some point and early return is added between the gst_ghost_pad_new_from_template and the gst_element_add_pad the GstPad will not be leaked.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150108/287e6c69/attachment-0002.html>
More information about the webkit-unassigned
mailing list