1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Fixed closing unused PID handles

This commit is contained in:
Klaus Schmidinger 2002-11-15 14:04:11 +01:00
parent 5198be3187
commit 2f49224c9c
3 changed files with 12 additions and 8 deletions

View File

@ -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

View File

@ -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).

View File

@ -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