qt: always update the sink_retrieved flag when the sink retrieves

Fixes a case where adding a qmlgloverlay element after an existing
qmlglsink elements was already in the pipeline would create an entirely
separate GstGLDisplay pointing to the same underlying display resource.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1050>
This commit is contained in:
Matthew Waters 2021-08-12 22:57:01 +10:00
parent 862aa25e53
commit cfd4a9a6d9

View file

@ -85,11 +85,11 @@ gst_qt_get_gl_display (gboolean sink)
GST_INFO ("returning previously created display");
G_UNLOCK (display_lock);
return display;
} else if (sink) {
sink_retrieved = sink;
}
gst_clear_object (&display);
}
if (sink)
sink_retrieved = sink;
GST_INFO ("QGuiApplication::instance()->platformName() %s", app->platformName().toUtf8().data());