summaryrefslogtreecommitdiff
path: root/device.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2005-02-27 13:40:33 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2005-02-27 13:40:33 +0100
commit940d605f2ef9efb424aa1f0e231fa7faba39c4bf (patch)
tree13cdc0b53b1fd3d6b341516a9dbc398ced580195 /device.c
parent59c0cc2eddd8265d427c71a87eae8a4cfee4d87a (diff)
downloadvdr-940d605f2ef9efb424aa1f0e231fa7faba39c4bf.tar.gz
vdr-940d605f2ef9efb424aa1f0e231fa7faba39c4bf.tar.bz2
Revisited 'Fixed calling cStatus::MsgChannelSwitch() in cDevice::SetChannel()' to allow keeping language codes in Trandfer Mode
Diffstat (limited to 'device.c')
-rw-r--r--device.c30
1 files changed, 14 insertions, 16 deletions
diff --git a/device.c b/device.c
index 6c74b08d..aecee91e 100644
--- a/device.c
+++ b/device.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: device.c 1.97 2005/02/26 16:19:57 kls Exp $
+ * $Id: device.c 1.98 2005/02/27 13:35:34 kls Exp $
*/
#include "device.h"
@@ -594,24 +594,22 @@ eSetChannelResult cDevice::SetChannel(const cChannel *Channel, bool LiveView)
else
Result = scrFailed;
Channels.Unlock();
- if (Result == scrOk) {
- if (LiveView && IsPrimaryDevice()) {
- // Set the available audio tracks:
- ClrAvailableTracks();
- for (int i = 0; i < MAXAPIDS; i++)
- SetAvailableTrack(ttAudio, i, Channel->Apid(i), Channel->Alang(i));
- if (Setup.UseDolbyDigital) {
- for (int i = 0; i < MAXDPIDS; i++)
- SetAvailableTrack(ttDolby, i, Channel->Dpid(i), Channel->Dlang(i));
- }
- currentChannel = Channel->Number();
- EnsureAudioTrack(true);
- }
- }
}
+
if (Result == scrOk) {
- if (LiveView && IsPrimaryDevice())
+ if (LiveView && IsPrimaryDevice()) {
currentChannel = Channel->Number();
+ // Set the available audio tracks:
+ ClrAvailableTracks();
+ for (int i = 0; i < MAXAPIDS; i++)
+ SetAvailableTrack(ttAudio, i, Channel->Apid(i), Channel->Alang(i));
+ if (Setup.UseDolbyDigital) {
+ for (int i = 0; i < MAXDPIDS; i++)
+ SetAvailableTrack(ttDolby, i, Channel->Dpid(i), Channel->Dlang(i));
+ }
+ if (!NeedsTransferMode)
+ EnsureAudioTrack(true);
+ }
cStatus::MsgChannelSwitch(this, Channel->Number()); // only report status if channel switch successfull
}