summaryrefslogtreecommitdiff
path: root/dvbdevice.c
diff options
context:
space:
mode:
Diffstat (limited to 'dvbdevice.c')
-rw-r--r--dvbdevice.c23
1 files changed, 8 insertions, 15 deletions
diff --git a/dvbdevice.c b/dvbdevice.c
index a2b4ce9..adc900b 100644
--- a/dvbdevice.c
+++ b/dvbdevice.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: dvbdevice.c 1.38 2002/12/07 14:50:46 kls Exp $
+ * $Id: dvbdevice.c 1.40 2002/12/14 10:52:13 kls Exp $
*/
#include "dvbdevice.h"
@@ -537,31 +537,26 @@ bool cDvbDevice::ProvidesChannel(const cChannel *Channel, int Priority, bool *Ne
bool needsDetachReceivers = true;
if (ProvidesSource(Channel->Source()) && ProvidesCa(Channel->Ca())) {
-#ifdef DO_MULTIPLE_RECORDINGS
+ result = hasPriority;
if (Receiving()) {
if (dvbTuner->IsTunedTo(Channel)) {
needsDetachReceivers = false;
if (!HasPid(Channel->Vpid())) {
- if (Channel->Ca() > CACONFBASE) {
+#ifdef DO_MULTIPLE_RECORDINGS
+ if (Channel->Ca() > CACONFBASE)
needsDetachReceivers = true;
- result = hasPriority;
- }
else if (!IsPrimaryDevice())
result = true;
#ifdef DO_REC_AND_PLAY_ON_PRIMARY_DEVICE
else
result = Priority >= Setup.PrimaryLimit;
#endif
+#endif
}
else
result = !IsPrimaryDevice() || Priority >= Setup.PrimaryLimit;
}
- else
- result = hasPriority;
}
- else
-#endif
- result = hasPriority;
}
if (NeedsDetachReceivers)
*NeedsDetachReceivers = needsDetachReceivers;
@@ -691,11 +686,9 @@ const char **cDvbDevice::GetAudioTracksDevice(int *CurrentTrack) const
void cDvbDevice::SetAudioTrackDevice(int Index)
{
if (0 <= Index && Index < NumAudioTracksDevice()) {
- int vpid = pidHandles[ptVideo].pid; // need to turn video PID off/on to restart demux
- DelPid(vpid);
- DelPid(pidHandles[ptAudio].pid);
- AddPid(Index ? aPid2 : aPid1, ptAudio);
- AddPid(vpid, ptVideo);
+ int Pid = Index ? aPid2 : aPid1;
+ pidHandles[ptAudio].pid = Pid;
+ SetPid(&pidHandles[ptAudio], ptAudio, true);
}
}