diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2005-02-19 12:20:53 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2005-02-19 12:20:53 +0100 |
commit | 605cd542806849373114419b1c65f8c5d8895c31 (patch) | |
tree | a18e57d2583f78832fa56085cede2077210cd2ed /device.c | |
parent | f226c845835e6174f2635b63cf1f045cb437d1c6 (diff) | |
download | vdr-605cd542806849373114419b1c65f8c5d8895c31.tar.gz vdr-605cd542806849373114419b1c65f8c5d8895c31.tar.bz2 |
Fixed calling cStatus::MsgChannelSwitch() in cDevice::SetChannel()
Diffstat (limited to 'device.c')
-rw-r--r-- | device.c | 30 |
1 files changed, 16 insertions, 14 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: device.c 1.92 2005/02/13 09:51:48 kls Exp $ + * $Id: device.c 1.93 2005/02/19 12:20:39 kls Exp $ */ #include "device.h" @@ -571,22 +571,24 @@ 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(); + currentAudioTrack = ttAudioFirst; + 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)); + } + EnsureAudioTrack(true); + } + } } - if (Result == scrOk) { - if (LiveView && IsPrimaryDevice()) { + if (LiveView && IsPrimaryDevice()) currentChannel = Channel->Number(); - // Set the available audio tracks: - ClrAvailableTracks(); - currentAudioTrack = ttAudioFirst; - 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)); - } - EnsureAudioTrack(true); - } cStatus::MsgChannelSwitch(this, Channel->Number()); // only report status if channel switch successfull } |