From 6bb53b26e0ac129236c6afb99243d9acb3a30648 Mon Sep 17 00:00:00 2001 From: BPanther Date: Thu, 5 Oct 2023 22:50:14 +0200 Subject: [PATCH] e4hdultra: fix pip/hdr problem --- src/neutrino.cpp | 4 ++-- src/zapit/src/zapit.cpp | 28 +++++++++++++++++++++++++++- 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/src/neutrino.cpp b/src/neutrino.cpp index a7cb7d92d..f75b9ef36 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -4393,7 +4393,7 @@ void CNeutrinoApp::tvMode( bool rezap ) videoDecoder->Standby(false); } -#ifdef ENABLE_PIP +#if 0//def ENABLE_PIP if (g_info.hw_caps->can_pip) { pipVideoDecoder[0]->Pig(g_settings.pip_x, g_settings.pip_y, @@ -4660,7 +4660,7 @@ void CNeutrinoApp::radioMode( bool rezap) videoDecoder->Standby(false); } -#ifdef ENABLE_PIP +#if 0//def ENABLE_PIP if (g_info.hw_caps->can_pip) { pipVideoDecoder[0]->Pig(g_settings.pip_radio_x, g_settings.pip_radio_y, diff --git a/src/zapit/src/zapit.cpp b/src/zapit/src/zapit.cpp index dbbc67d39..7d4516ae6 100644 --- a/src/zapit/src/zapit.cpp +++ b/src/zapit/src/zapit.cpp @@ -670,6 +670,28 @@ bool CZapit::StopPip(int pip) pipAudioDecoder[pip]->Stop(); pip_fe[pip] = NULL; pip_channel_id[pip] = 0; + + if (pipVideoDecoder[pip]) + { + delete pipVideoDecoder[pip]; + pipVideoDecoder[pip] = NULL; + } + if (pipVideoDemux[pip]) + { + delete pipVideoDemux[pip]; + pipVideoDemux[pip] = NULL; + } + if (pipAudioDecoder[pip]) + { + delete pipAudioDecoder[pip]; + pipAudioDecoder[pip] = NULL; + } + if (pipAudioDemux[pip]) + { + delete pipAudioDemux[pip]; + pipAudioDemux[pip] = NULL; + } + return true; } return false; @@ -680,6 +702,10 @@ bool CZapit::StartPip(const t_channel_id channel_id, int pip) if (!g_info.hw_caps->can_pip) return false; + pipVideoDecoder[pip] = new cVideo(0, NULL, NULL, pip+1); + pipVideoDecoder[pip]->ShowPig(0); + pipAudioDecoder[pip] = new cAudio(0, NULL, NULL, pip+1); + CZapitChannel* newchannel; bool transponder_change; /* do lock if live is running, or in record mode - @@ -2268,7 +2294,7 @@ bool CZapit::Start(Z_start_arg *ZapStart_arg) videoDecoder->Standby(false); audioDecoder = new cAudio(audioDemux->getBuffer(), videoDecoder->GetTVEnc(), NULL /*videoDecoder->GetTVEncSD()*/); -#ifdef ENABLE_PIP +#if 0//def ENABLE_PIP if (g_info.hw_caps->can_pip) { for (unsigned i=0; i < (unsigned int) g_info.hw_caps->pip_devs; i++)