diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 36111d63..c22ce686 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -1151,6 +1151,9 @@ Marco Schl 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 pointing out that EnsureAudioTrack() in cDevice::SetChannel() should not be + called if a Transfer Mode is started, to avoid setting the audio PID on the primary + device for fixing calling cStatus::MsgChannelSwitch() in cDevice::SetChannel() for increasing POLLTIMEOUTS_BEFORE_DEVICECLEAR in transfer.c to 6 to avoid problems with the larger buffer reserve diff --git a/HISTORY b/HISTORY index e8ffd1df..6b9f2839 100644 --- a/HISTORY +++ b/HISTORY @@ -3422,8 +3422,9 @@ 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). +- No longer calling EnsureAudioTrack() in cDevice::SetChannel() if a Transfer Mode is + started, to avoid setting the audio PID on the primary device (thanks to Marco + Schlüßler for pointing this out). - Replaced the call to system("sync") in SpinUpDisk() with fdatasync(f) to avoid problems on NPTL systems (thanks to Chris Warren for pointing this out). - Increased POLLTIMEOUTS_BEFORE_DEVICECLEAR in transfer.c to 6 to avoid problems 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 }