mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Fixed switching to a visible programme in case the current channel has neither a video nor an audio PID
This commit is contained in:
parent
d828badbe0
commit
f379b56d0e
4
HISTORY
4
HISTORY
@ -2652,6 +2652,8 @@ Video Disk Recorder Revision History
|
||||
actual CAM type as reported by the CAM. The 'ca.conf' file has been stripped
|
||||
down to the values 0..4.
|
||||
|
||||
2004-02-09: Version 1.3.5
|
||||
2004-02-13: Version 1.3.5
|
||||
|
||||
- Fixed reading the EPG preferred language parameter from 'setup.conf'.
|
||||
- Fixed switching to a visible programme in case the current channel has neither
|
||||
a video nor an audio PID.
|
||||
|
16
vdr.c
16
vdr.c
@ -22,7 +22,7 @@
|
||||
*
|
||||
* The project's page is at http://www.cadsoft.de/vdr
|
||||
*
|
||||
* $Id: vdr.c 1.175 2004/02/08 11:23:29 kls Exp $
|
||||
* $Id: vdr.c 1.176 2004/02/13 13:13:13 kls Exp $
|
||||
*/
|
||||
|
||||
#include <getopt.h>
|
||||
@ -496,11 +496,15 @@ int main(int argc, char *argv[])
|
||||
if (!EITScanner.Active() && cDevice::PrimaryDevice()->HasDecoder() && !cDevice::PrimaryDevice()->HasProgramme()) {
|
||||
static time_t lastTime = 0;
|
||||
if (time(NULL) - lastTime > MINCHANNELWAIT) {
|
||||
if (!Channels.SwitchTo(cDevice::CurrentChannel()) // try to switch to the original channel...
|
||||
&& !(LastTimerChannel > 0 && Channels.SwitchTo(LastTimerChannel)) // ...or the one used by the last timer...
|
||||
&& !cDevice::SwitchChannel(1) // ...or the next higher available one...
|
||||
&& !cDevice::SwitchChannel(-1)) // ...or the next lower available one
|
||||
lastTime = time(NULL); // don't do this too often
|
||||
cChannel *Channel = Channels.GetByNumber(cDevice::CurrentChannel());
|
||||
if (Channel && (Channel->Vpid() || Channel->Apid1())) {
|
||||
if (!Channels.SwitchTo(cDevice::CurrentChannel()) // try to switch to the original channel...
|
||||
&& !(LastTimerChannel > 0 && Channels.SwitchTo(LastTimerChannel)) // ...or the one used by the last timer...
|
||||
&& !cDevice::SwitchChannel(1) // ...or the next higher available one...
|
||||
&& !cDevice::SwitchChannel(-1)) // ...or the next lower available one
|
||||
;
|
||||
}
|
||||
lastTime = time(NULL); // don't do this too often
|
||||
LastTimerChannel = -1;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user