summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2002-11-15 14:04:11 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2002-11-15 14:04:11 +0100
commit2f49224c9c9bf1e3c8595137894977aef6ef0cca (patch)
tree311949769a42480946d1fdecede372addc12219f
parent5198be318702316b1bb516f20cc9f6b20d311d9a (diff)
downloadvdr-2f49224c9c9bf1e3c8595137894977aef6ef0cca.tar.gz
vdr-2f49224c9c9bf1e3c8595137894977aef6ef0cca.tar.bz2
Fixed closing unused PID handles
-rw-r--r--CONTRIBUTORS3
-rw-r--r--HISTORY4
-rw-r--r--dvbdevice.c13
3 files changed, 12 insertions, 8 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 6463c532..4310db77 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -466,3 +466,6 @@ Steffen Barszus <st_barszus@gmx.de>
Peter Seyringer <e9425234@student.tuwien.ac.at>
for reporting a bug in saving the polarization parameter of channels that have a
number in the 'source' parameter
+
+Stefan Schluenss <dxr3_osd@schluenss.de>
+ for reporting a bug where PID handles were not closed correctly
diff --git a/HISTORY b/HISTORY
index a9da2339..b3f356ce 100644
--- a/HISTORY
+++ b/HISTORY
@@ -1768,6 +1768,8 @@ Video Disk Recorder Revision History
- Fixed a compiler warning regarding cMenuChannels::Del() and MenuTimers::Del() hiding
the base class virtual functions.
-2002-11-11: Version 1.1.17
+2002-11-15: Version 1.1.17
- Added new entries to 'ca.conf'.
+- Fixed closing unused PID handles (thanks to Stefan Schluenss for reporting this
+ one).
diff --git a/dvbdevice.c b/dvbdevice.c
index 119a28e6..c519266e 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.35 2002/11/10 12:57:17 kls Exp $
+ * $Id: dvbdevice.c 1.36 2002/11/15 13:53:41 kls Exp $
*/
#include "dvbdevice.h"
@@ -311,11 +311,11 @@ bool cDvbDevice::SetPid(cPidHandle *Handle, int Type, bool On)
pesFilterParams.pes_type= PesTypes[Type];
pesFilterParams.flags = DMX_IMMEDIATE_START;
CHECK(ioctl(Handle->handle, DMX_SET_PES_FILTER, &pesFilterParams));
- close(Handle->handle);
- Handle->handle = -1;
if (PesTypes[Type] == DMX_PES_VIDEO) // let's only do this once
SetPlayMode(pmNone); // necessary to switch a PID from DMX_PES_VIDEO/AUDIO to DMX_PES_OTHER
}
+ close(Handle->handle);
+ Handle->handle = -1;
}
}
return true;
@@ -393,10 +393,9 @@ bool cDvbDevice::SetChannelDevice(const cChannel *Channel, bool LiveView)
bool TurnOffLivePIDs = HasDecoder()
&& (DoTune
|| IsEncrypted && pidHandles[ptVideo].pid != Channel->Vpid() // CA channels can only be decrypted in "live" mode
- || IsPrimaryDevice()
- && (LiveView // for a new live view the old PIDs need to be turned off
- || pidHandles[ptVideo].pid == Channel->Vpid() // for recording the PIDs must be shifted from DMX_PES_AUDIO/VIDEO to DMX_PES_OTHER
- )
+ || !IsPrimaryDevice()
+ || LiveView // for a new live view the old PIDs need to be turned off
+ || pidHandles[ptVideo].pid == Channel->Vpid() // for recording the PIDs must be shifted from DMX_PES_AUDIO/VIDEO to DMX_PES_OTHER
);
bool StartTransferMode = IsPrimaryDevice() && !IsEncrypted && !DoTune