mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 04:31:06 +00:00
qt: use a static_cast instead of dynamic one
The dynamic_cast is a little but of overkill as the app will still crash if it fails in the later g_assert. Allows compilation with -fno-rtti https://bugzilla.gnome.org/show_bug.cgi?id=762526
This commit is contained in:
parent
472b396528
commit
6c6a9cf509
2 changed files with 2 additions and 2 deletions
|
@ -305,7 +305,7 @@ gst_qt_sink_change_state (GstElement * element, GstStateChange transition)
|
|||
|
||||
switch (transition) {
|
||||
case GST_STATE_CHANGE_NULL_TO_READY:
|
||||
app = dynamic_cast<QGuiApplication *> (QCoreApplication::instance ());
|
||||
app = static_cast<QGuiApplication *> (QCoreApplication::instance ());
|
||||
if (!app) {
|
||||
GST_ELEMENT_ERROR (element, RESOURCE, NOT_FOUND,
|
||||
("%s", "Failed to connect to Qt"),
|
||||
|
|
|
@ -122,7 +122,7 @@ void InitializeSceneGraph::run()
|
|||
|
||||
QtGLVideoItem::QtGLVideoItem()
|
||||
{
|
||||
QGuiApplication *app = dynamic_cast<QGuiApplication *> (QCoreApplication::instance ());
|
||||
QGuiApplication *app = static_cast<QGuiApplication *> (QCoreApplication::instance ());
|
||||
static volatile gsize _debug;
|
||||
|
||||
g_assert (app != NULL);
|
||||
|
|
Loading…
Reference in a new issue