summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2005-02-19 12:20:53 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2005-02-19 12:20:53 +0100
commit605cd542806849373114419b1c65f8c5d8895c31 (patch)
treea18e57d2583f78832fa56085cede2077210cd2ed
parentf226c845835e6174f2635b63cf1f045cb437d1c6 (diff)
downloadvdr-605cd542806849373114419b1c65f8c5d8895c31.tar.gz
vdr-605cd542806849373114419b1c65f8c5d8895c31.tar.bz2
Fixed calling cStatus::MsgChannelSwitch() in cDevice::SetChannel()
-rw-r--r--CONTRIBUTORS1
-rw-r--r--HISTORY2
-rw-r--r--device.c30
3 files changed, 19 insertions, 14 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 26f6d57a..cc12503f 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -1148,6 +1148,7 @@ Marco Schlüßler <marco@lordzodiac.de>
for reporting a missing 'resultSkipped = 0' in cRemux::Clear()
for reporting a missing reset of the 'repacker' in cTS2PES::Clear()
for avoiding unnecessary calls to SetPid() in cDvbDevice::SetAudioTrackDevice()
+ for fixing calling cStatus::MsgChannelSwitch() in cDevice::SetChannel()
Jürgen Schmitz <j.schmitz@web.de>
for reporting a bug in displaying the current channel when switching via the SVDRP
diff --git a/HISTORY b/HISTORY
index 44c5cb31..df11f471 100644
--- a/HISTORY
+++ b/HISTORY
@@ -3422,3 +3422,5 @@ Video Disk Recorder Revision History
cEvent::FixEpgBugs() (thanks to Wolfgang Rohdewald).
- Avoiding unnecessary calls to SetPid() in cDvbDevice::SetAudioTrackDevice()
(thanks to Marco Schlüßler).
+- Fixed calling cStatus::MsgChannelSwitch() in cDevice::SetChannel() (thanks to
+ Marco Schlüßler).
diff --git a/device.c b/device.c
index f270b5a4..8685e3c0 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.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
}