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:
parent
5198be3187
commit
2f49224c9c
@ -466,3 +466,6 @@ Steffen Barszus <st_barszus@gmx.de>
|
|||||||
Peter Seyringer <e9425234@student.tuwien.ac.at>
|
Peter Seyringer <e9425234@student.tuwien.ac.at>
|
||||||
for reporting a bug in saving the polarization parameter of channels that have a
|
for reporting a bug in saving the polarization parameter of channels that have a
|
||||||
number in the 'source' parameter
|
number in the 'source' parameter
|
||||||
|
|
||||||
|
Stefan Schluenss <dxr3_osd@schluenss.de>
|
||||||
|
for reporting a bug where PID handles were not closed correctly
|
||||||
|
4
HISTORY
4
HISTORY
@ -1768,6 +1768,8 @@ Video Disk Recorder Revision History
|
|||||||
- Fixed a compiler warning regarding cMenuChannels::Del() and MenuTimers::Del() hiding
|
- Fixed a compiler warning regarding cMenuChannels::Del() and MenuTimers::Del() hiding
|
||||||
the base class virtual functions.
|
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'.
|
- Added new entries to 'ca.conf'.
|
||||||
|
- Fixed closing unused PID handles (thanks to Stefan Schluenss for reporting this
|
||||||
|
one).
|
||||||
|
13
dvbdevice.c
13
dvbdevice.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* 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"
|
#include "dvbdevice.h"
|
||||||
@ -311,11 +311,11 @@ bool cDvbDevice::SetPid(cPidHandle *Handle, int Type, bool On)
|
|||||||
pesFilterParams.pes_type= PesTypes[Type];
|
pesFilterParams.pes_type= PesTypes[Type];
|
||||||
pesFilterParams.flags = DMX_IMMEDIATE_START;
|
pesFilterParams.flags = DMX_IMMEDIATE_START;
|
||||||
CHECK(ioctl(Handle->handle, DMX_SET_PES_FILTER, &pesFilterParams));
|
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
|
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
|
SetPlayMode(pmNone); // necessary to switch a PID from DMX_PES_VIDEO/AUDIO to DMX_PES_OTHER
|
||||||
}
|
}
|
||||||
|
close(Handle->handle);
|
||||||
|
Handle->handle = -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@ -393,10 +393,9 @@ bool cDvbDevice::SetChannelDevice(const cChannel *Channel, bool LiveView)
|
|||||||
bool TurnOffLivePIDs = HasDecoder()
|
bool TurnOffLivePIDs = HasDecoder()
|
||||||
&& (DoTune
|
&& (DoTune
|
||||||
|| IsEncrypted && pidHandles[ptVideo].pid != Channel->Vpid() // CA channels can only be decrypted in "live" mode
|
|| IsEncrypted && pidHandles[ptVideo].pid != Channel->Vpid() // CA channels can only be decrypted in "live" mode
|
||||||
|| IsPrimaryDevice()
|
|| !IsPrimaryDevice()
|
||||||
&& (LiveView // for a new live view the old PIDs need to be turned off
|
|| 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
|
|| 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
|
bool StartTransferMode = IsPrimaryDevice() && !IsEncrypted && !DoTune
|
||||||
|
Loading…
Reference in New Issue
Block a user