Skip to content

Instantly share code, notes, and snippets.

@muesli
Last active December 10, 2015 08:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save muesli/4408069 to your computer and use it in GitHub Desktop.
Save muesli/4408069 to your computer and use it in GitHub Desktop.
diff --git a/src/utils/libvlc.cpp b/src/utils/libvlc.cpp
index 69d626e..9cd31df 100644
--- a/src/utils/libvlc.cpp
+++ b/src/utils/libvlc.cpp
@@ -112,6 +112,7 @@ bool LibVLC::init()
// Do not preload services discovery modules, we don't use them.
args << "--services-discovery=''";
// Allow multiple starts (one gets to wonder whether that makes a difference.
+#ifndef Q_OS_MAC
args << "--no-one-instance";
// This causes leaky abstraction. VLC by default will create a default vout/aout
// when none was defined/requested. i.e. when you have a VideoWidget but
@@ -119,6 +120,7 @@ bool LibVLC::init()
// equally if you have only an AudioOutput and play a video VLC will pop
// up a Video window.
+#endif
args << "--aout=auhal";
args << "--vout=dummy";
// Build const char* array
@@ -192,6 +194,7 @@ QStringList LibVLC::findAllLibVlcPaths()
paths << QCoreApplication::applicationDirPath()
<< QCoreApplication::applicationDirPath() % QLatin1Literal("/../Frameworks")
<< QCoreApplication::applicationDirPath() % QLatin1Literal("/../PlugIns")
+ << QCoreApplication::applicationDirPath() % QLatin1Literal("/../plugins")
<< QCoreApplication::applicationDirPath() % QLatin1Literal("/lib");
#endif
paths << QString::fromLatin1(qgetenv("LD_LIBRARY_PATH"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment