Skip to content

Commit

Permalink
fix pip
Browse files Browse the repository at this point in the history
  • Loading branch information
BPanther committed Oct 6, 2023
1 parent 0b41940 commit a63a820
Showing 1 changed file with 13 additions and 15 deletions.
28 changes: 13 additions & 15 deletions src/zapit/src/zapit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -662,40 +662,38 @@ bool CZapit::StopPip(int pip)

if (pip_channel_id[pip]) {
INFO("[pip %d] stop %llx", pip, pip_channel_id[pip]);
pipVideoDecoder[pip]->ShowPig(0);
CCamManager::getInstance()->Stop(pip_channel_id[pip], CCamManager::PIP);

pipVideoDemux[pip]->Stop();
pipVideoDecoder[pip]->Stop();
pipAudioDemux[pip]->Stop();
pipAudioDecoder[pip]->Stop();

pip_fe[pip] = NULL;
pip_channel_id[pip] = 0;
}

if (pipVideoDemux[pip])
{
pipVideoDemux[pip]->Stop();
delete pipVideoDemux[pip];
pipVideoDemux[pip] = NULL;
}
if (pipVideoDecoder[pip])
{
pipVideoDecoder[pip]->ShowPig(0);
pipVideoDecoder[pip]->Stop();
pipVideoDecoder[pip]->closeDevice();
delete pipVideoDecoder[pip];
pipVideoDecoder[pip] = NULL;
}
if (pipVideoDemux[pip])
if (pipAudioDemux[pip])
{
delete pipVideoDemux[pip];
pipVideoDemux[pip] = NULL;
pipAudioDemux[pip]->Stop();
delete pipAudioDemux[pip];
pipAudioDemux[pip] = NULL;
}
if (pipAudioDecoder[pip])
{
pipAudioDecoder[pip]->Stop();
pipAudioDecoder[pip]->closeDevice();
delete pipAudioDecoder[pip];
pipAudioDecoder[pip] = NULL;
}
if (pipAudioDemux[pip])
{
delete pipAudioDemux[pip];
pipAudioDemux[pip] = NULL;
}

return true;
}
Expand Down

0 comments on commit a63a820

Please sign in to comment.