diff --git a/src/neutrino.cpp b/src/neutrino.cpp index e2e298e2a..32a2a00d7 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -3993,12 +3993,18 @@ void CNeutrinoApp::standbyMode( bool bOnOff ) CVFD::getInstance()->setMode(CVFD::MODE_TVRADIO); g_Zapit->setStandby(false); - if(was_record) - g_Zapit->startPlayBack(); - else { - channelList->setSelected(0xfffffff); /* make sure that zapTo_ChannelID will zap */ - channelList->zapTo_ChannelID(live_channel_id); - } + /* the old code did: + if(was_record) g_Zapit->startPlayBack() + unfortunately this bypasses the parental PIN code check if a record timer + was set on a locked channel, then the box put in standby and after the + recording started, the box was woken up. + The channelList->setSelected(); channelList->zapTo_ChannelID() sequence + does trigger the PIN check + If the channel is the same (as during a recording), then it will only + check PIN and not zap, so we should be fine here + */ + channelList->setSelected(0xfffffff); /* make sure that zapTo_ChannelID will zap */ + channelList->zapTo_ChannelID(live_channel_id); if(recordingstatus) was_record = 0; videoDecoder->Standby(false); diff --git a/src/zapit/src/zapit.cpp b/src/zapit/src/zapit.cpp index d9cacb238..07f45e2cf 100644 --- a/src/zapit/src/zapit.cpp +++ b/src/zapit/src/zapit.cpp @@ -387,7 +387,7 @@ void start_camd(bool forupdate = false) static int pmt_update_fd = -1; static bool update_pmt = true; -int zapit(const t_channel_id channel_id, bool in_nvod, bool forupdate = 0, bool /*nowait*/ = 0) +int zapit(const t_channel_id channel_id, bool in_nvod, bool forupdate = 0, bool startplayback = true) { bool transponder_change = false; tallchans_iterator cit; @@ -592,7 +592,7 @@ printf("[zapit] saving channel, apid %x sub pid %x mode %d volume %d\n", g_curre audioDecoder->setChannel(audio_mode); } - if (!we_playing) + if (!we_playing && startplayback) startPlayBack(g_current_channel); printf("[zapit] sending capmt....\n"); @@ -2088,10 +2088,9 @@ void leaveStandby(void) } standby = false; -#if 0 if (g_current_channel) - zapit(live_channel_id, current_is_nvod, false, true); -#endif + /* tune channel, with stopped playback to not bypass the parental PIN check */ + zapit(live_channel_id, current_is_nvod, false, false); } unsigned zapTo(const unsigned int bouquet, const unsigned int pchannel)