Skip to content

Commit

Permalink
Create AirPlay server after MainWindow got initialized.
Browse files Browse the repository at this point in the history
Got an instance where AirPlay got ready before the main window was up and attempted playback causing a crash
  • Loading branch information
jyavenard committed Jul 10, 2013
1 parent 6143e66 commit 578abe3
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions mythtv/programs/mythfrontend/main.cpp
Expand Up @@ -1581,17 +1581,6 @@ int main(int argc, char **argv)
}
#endif

#ifdef USING_AIRPLAY
if (gCoreContext->GetNumSetting("AirPlayEnabled", true))
{
MythRAOPDevice::Create();
if (!gCoreContext->GetNumSetting("AirPlayAudioOnly", false))
{
MythAirplayServer::Create();
}
}
#endif

LCD::SetupLCD();
if (LCD *lcd = LCD::Get())
lcd->setupLEDs(RemoteGetRecordingMask);
Expand Down Expand Up @@ -1627,6 +1616,17 @@ int main(int argc, char **argv)
#endif
mainWindow->setWindowTitle(QObject::tr("MythTV Frontend"));

#ifdef USING_AIRPLAY
if (gCoreContext->GetNumSetting("AirPlayEnabled", true))
{
MythRAOPDevice::Create();
if (!gCoreContext->GetNumSetting("AirPlayAudioOnly", false))
{
MythAirplayServer::Create();
}
}
#endif

// We must reload the translation after a language change and this
// also means clearing the cached/loaded theme strings, so reload the
// theme which also triggers a translation reload
Expand Down

0 comments on commit 578abe3

Please sign in to comment.