X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/4a594e382e063bc9f313683d2bd6c679cbad0e9a..462ec6f4ad2051551cb91c75ba614d3b7b17c543:/lib/dvb/dvb.cpp diff --git a/lib/dvb/dvb.cpp b/lib/dvb/dvb.cpp index 5c8c2cf6..8af8bb0e 100644 --- a/lib/dvb/dvb.cpp +++ b/lib/dvb/dvb.cpp @@ -304,7 +304,7 @@ RESULT eDVBResourceManager::allocateChannel(const eDVBChannelID &channelid, eUse if(channelid==cache_chan->getChannelID()) { eDebug("use cached_channel"); - channel=m_cached_channel; + channel = m_cached_channel; return 0; } m_cached_channel=0; @@ -591,8 +591,18 @@ void eDVBChannel::frontendStateChanged(iDVBFrontend*fe) ourstate = state_tuning; } else if (state == iDVBFrontend::stateLostLock) { - eDebug("OURSTATE: lost lock"); - ourstate = state_unavailable; + /* on managed channels, we try to retune in order to re-acquire lock. */ + if (m_feparm) + { + eDebug("OURSTATE: lost lock, trying to retune"); + ourstate = state_tuning; + m_frontend->get().tune(*m_feparm); + } else + /* on unmanaged channels, we don't do this. the client will do this. */ + { + eDebug("OURSTATE: lost lock, unavailable now."); + ourstate = state_unavailable; + } } else if (state == iDVBFrontend::stateFailed) { eDebug("OURSTATE: failed"); @@ -652,6 +662,7 @@ RESULT eDVBChannel::setChannel(const eDVBChannelID &channelid, ePtrget().tune(*feparm); + m_feparm = feparm; if (res) {