1
0
mirror of https://github.com/rofafor/vdr-plugin-satip.git synced 2023-10-10 13:37:42 +02:00

Fixed tuner shutdown.

This commit is contained in:
Rolf Ahrenberg 2014-11-22 21:32:55 +02:00
parent 5d697c36dc
commit 1f528cf7e1

16
tuner.c
View File

@ -450,11 +450,23 @@ bool cSatipTuner::StateRequested(void)
bool cSatipTuner::RequestState(eTunerState stateP) bool cSatipTuner::RequestState(eTunerState stateP)
{ {
cMutexLock MutexLock(&mutexM); cMutexLock MutexLock(&mutexM);
debug("cSatipTuner::%s(%s) [device %d]", __FUNCTION__, TunerStateString(stateP), deviceIdM); debug("cSatipTuner::%s(%s) %s <> %s [device %d]", __FUNCTION__, TunerStateString(stateP), TunerStateString(currentStateM), TunerStateString(nextStateM), deviceIdM);
// validate legal state changes
switch (currentStateM) {
case tsIdle:
if (stateP == tsRelease)
return false;
case tsRelease:
case tsSet:
case tsLocked:
case tsTuned:
default:
break;
}
nextStateM = stateP; nextStateM = stateP;
// validate legal state changes
return true; return true;
} }