Skip to content

Commit

Permalink
fix pip avinput (ext hdmi)
Browse files Browse the repository at this point in the history
  • Loading branch information
BPanther committed Oct 6, 2023
1 parent 84e7cb0 commit 1b6c52f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
21 changes: 16 additions & 5 deletions src/neutrino.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4750,13 +4750,24 @@ void CNeutrinoApp::StartAVInputPiP() {
}

void CNeutrinoApp::StopAVInputPiP() {
if (!g_info.hw_caps->can_pip)
if (!g_info.hw_caps->can_pip || !avinput_pip)
return;

pipVideoDecoder[0]->ShowPig(0);
pipVideoDemux[0]->Stop();
pipVideoDecoder[0]->Stop();
pipVideoDecoder[0]->close_AVInput_Device();
if (pipVideoDemux[0])
{
pipVideoDemux[0]->Stop();
delete pipVideoDemux[0];
pipVideoDemux[0] = NULL;
}
if (pipVideoDecoder[0])
{
pipVideoDecoder[0]->ShowPig(0);
pipVideoDecoder[0]->Stop();
pipVideoDecoder[0]->close_AVInput_Device();
pipVideoDecoder[0]->closeDevice();
delete pipVideoDecoder[0];
pipVideoDecoder[0] = NULL;
}
avinput_pip = false;
}
#endif
Expand Down
4 changes: 4 additions & 0 deletions src/zapit/src/zapit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -703,6 +703,10 @@ bool CZapit::StartPip(const t_channel_id channel_id, int pip)
if (!g_info.hw_caps->can_pip)
return false;

if (CNeutrinoApp::getInstance()->avinput_pip) {
StopPip(0);
}

pipVideoDecoder[pip] = new cVideo(0, NULL, NULL, pip+1);
pipVideoDecoder[pip]->ShowPig(0);
pipVideoDemux[pip] = new cDemux(pip+1);
Expand Down

0 comments on commit 1b6c52f

Please sign in to comment.