+++ This bug was initially created as a clone of Bug #204624 +++ > Source/WebCore/platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp:151 > + // The floating ref removal support was added in https://bugzilla.gnome.org/show_bug.cgi?id=743062. > + bool shouldAdoptRef = webkitGstCheckVersion(1, 14, 0); I think we could simplify the code by adding adoptGLRef() or something like that, similar to ensureGRef, that only accepts GstGLDisplay org GstGLContext and adopts the returned ref or not depending on the GST version.
> Source/WebCore/platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp:252 > +#if GST_CHECK_VERSION(1, 12, 0) > + gst_structure_set(structure, "context", GST_TYPE_GL_CONTEXT, priv->glContext.get(), nullptr); > +#else > + gst_structure_set(structure, "context", GST_GL_TYPE_CONTEXT, priv->glContext.get(), nullptr); > +#endif Follow up or not, I think we could #define this above and have just one line here.
Since we now require at least gst 1.14 this is no longer a concern.