diff -Nurp -x '*~' vdr-1.4.0/device.c vdr-1.4.0-fix/device.c
--- vdr-1.4.0/device.c	2006-04-14 17:34:43.000000000 +0300
+++ vdr-1.4.0-fix/device.c	2006-05-14 01:06:32.000000000 +0300
@@ -588,7 +586,7 @@ bool cDevice::SwitchChannel(int Directio
      cChannel *channel;
      while ((channel = Channels.GetByNumber(n, Direction)) != NULL) {
            // try only channels which are currently available
-           if (PrimaryDevice()->ProvidesChannel(channel, Setup.PrimaryLimit) || PrimaryDevice()->CanReplay() && GetDevice(channel, 0))
+           if (PrimaryDevice()->ProvidesChannel(channel, Setup.PrimaryLimit) || PrimaryDevice()->CanReplay() && GetDevice(channel, Setup.PrimaryLimit))
               break;
            n = channel->Number() + Direction;
            }
@@ -627,7 +625,7 @@ eSetChannelResult cDevice::SetChannel(co
   // use the card that actually can receive it and transfer data from there:
 
   if (NeedsTransferMode) {
-     cDevice *CaDevice = GetDevice(Channel, 0, &NeedsDetachReceivers);
+     cDevice *CaDevice = GetDevice(Channel, Setup.PrimaryLimit, &NeedsDetachReceivers);
      if (CaDevice && CanReplay()) {
         cStatus::MsgChannelSwitch(this, 0); // only report status if we are actually going to switch the channel
         if (CaDevice->SetChannel(Channel, false) == scrOk) { // calling SetChannel() directly, not SwitchChannel()!
@@ -1158,7 +1156,7 @@ int cDevice::Ca(void) const
 
 int cDevice::Priority(void) const
 {
-  int priority = IsPrimaryDevice() ? Setup.PrimaryLimit - 1 : DEFAULTPRIORITY;
+  int priority = ActualDevice() == this ? Setup.PrimaryLimit - 1 : DEFAULTPRIORITY;
   for (int i = 0; i < MAXRECEIVERS; i++) {
       if (receiver[i])
          priority = max(receiver[i]->priority, priority);
