]> git.sesse.net Git - nageru/blobdiff - main.cpp
Fix fading to/from deinterlaced sources.
[nageru] / main.cpp
index 927f6c1ec4b668df4b20c1f06f05d618f8b1cb78..6cf1ddec055275855fd30bcd8824cfd4e0bd1aaf 100644 (file)
--- a/main.cpp
+++ b/main.cpp
@@ -19,10 +19,16 @@ extern "C" {
 
 int main(int argc, char *argv[])
 {
-       setenv("QT_XCB_GL_INTEGRATION", "xcb_egl", 0);
+       parse_flags(argc, argv);
+
+       if (global_flags.va_display.empty() ||
+           global_flags.va_display[0] != '/') {
+               // We normally use EGL for zerocopy, but if we use VA against DRM
+               // instead of against X11, we turn it off, and then don't need EGL.
+               setenv("QT_XCB_GL_INTEGRATION", "xcb_egl", 0);
+       }
        setlinebuf(stdout);
        av_register_all();
-       parse_flags(argc, argv);
 
        QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts, true);
        QApplication app(argc, argv);
@@ -40,13 +46,14 @@ int main(int argc, char *argv[])
        global_share_widget = new QGLWidget();
 
        MainWindow mainWindow;
-       mainWindow.resize(QSize(1500, 800));
+       mainWindow.resize(QSize(1500, 810));
        mainWindow.show();
 
        app.installEventFilter(&mainWindow);  // For white balance color picking.
 
        int rc = app.exec();
        global_mixer->quit();
+       mainWindow.mixer_shutting_down();
        delete global_mixer;
        return rc;
 }