- fix compiler warning and segfault in avinput_pip handling

Conflicts:
	src/neutrino.cpp

Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
svenhoefer
2021-05-10 22:50:17 +02:00
committed by Thilo Graf
parent f27ff4563c
commit 71a670d821
2 changed files with 20 additions and 19 deletions

View File

@@ -195,7 +195,6 @@ extern cVideo * videoDecoder;
#ifdef ENABLE_PIP
extern cVideo *pipDecoder;
extern cDemux *pipDemux;
static bool avinput_pip = false;
#endif
extern cDemux *videoDemux;
extern cAudio * audioDecoder;
@@ -276,6 +275,11 @@ CNeutrinoApp::CNeutrinoApp()
channels_init = false;
channelList_allowed = true;
channelList_painted = false;
#ifdef ENABLE_PIP
avinput_pip = false;
#endif
}
/*-------------------------------------------------------------------------------------
@@ -3358,16 +3362,13 @@ void CNeutrinoApp::RealRun()
ShowMsg(LOCALE_MESSAGEBOX_ERROR, LOCALE_BOXMODE12_NOT_ACTIVATED, CMsgBox::mbrOk, CMsgBox::mbOk, NEUTRINO_ICON_ERROR);
else
{
if (!avinput_pip) {
if (CZapit::getInstance()->GetPipChannelID())
CZapit::getInstance()->StopPip();
if (CZapit::getInstance()->GetPipChannelID())
CZapit::getInstance()->StopPip();
if (!avinput_pip)
StartAVInputPiP();
} else {
if (CZapit::getInstance()->GetPipChannelID())
CZapit::getInstance()->StopPip();
else
StopAVInputPiP();
}
else
StopAVInputPiP();
}
}
else if (msg == (neutrino_msg_t) g_settings.key_pip_setup) {
@@ -5137,16 +5138,14 @@ int CNeutrinoApp::exec(CMenuTarget* parent, const std::string & actionKey)
#ifdef ENABLE_PIP
else if (actionKey=="avinput_pip") {
if (!avinput_pip) {
if (CZapit::getInstance()->GetPipChannelID())
CZapit::getInstance()->StopPip();
if (CZapit::getInstance()->GetPipChannelID())
CZapit::getInstance()->StopPip();
if (!avinput_pip)
StartAVInputPiP();
} else {
if (CZapit::getInstance()->GetPipChannelID())
CZapit::getInstance()->StopPip();
else
StopAVInputPiP();
}
else
StopAVInputPiP();
returnval = menu_return::RETURN_EXIT_ALL;
}
#endif