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

The section handler is now stopped before the device is destroyed

This commit is contained in:
Klaus Schmidinger 2008-02-09 16:28:15 +01:00
parent 7ad17726d8
commit df0e2f0dc8
5 changed files with 32 additions and 9 deletions

View File

@ -86,6 +86,7 @@ Deti Fliegl <deti@fliegl.de>
for implementing the 'CurrentChannel' setup parameter
for fixing setting the OSD size in the 'Confirm' interface call
for fixing handling improper buffer lengths in the EIT parser
for a patch that was used to implement StopSectionHandler()
Dave Chapman <dave@dchapman.com>
for implementing support for the teletext PID
@ -1158,6 +1159,7 @@ Reinhard Nissl <rnissl@gmx.de>
for a patch that was used to fix handling small PES packets that caused subtitles
to be displayed late in live mode
for a patch that was used to implement handling of DVB-S2
for reporting an invalid access in the section handler when ending VDR
Richard Robson <richard_robson@beeb.net>
for reporting freezing replay if a timer starts while in Transfer Mode from the

View File

@ -5599,3 +5599,7 @@ Video Disk Recorder Revision History
by Andreas Brugger).
- Improved sending all frames to devices that can handle them in fast forward
trick speeds, including subtitles (thanks to Timo Eskola).
- The section handler is now stopped before the device is destroyed, to avoid
accessing file handles after they have become invalid (thanks to Reinhard
Nissl for reporting an invalid access when ending VDR, and to Deti Fliegl for
a patch that was used to implement StopSectionHandler()).

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: device.c 1.151 2008/02/09 15:09:04 kls Exp $
* $Id: device.c 1.152 2008/02/09 16:10:56 kls Exp $
*/
#include "device.h"
@ -264,11 +264,6 @@ cDevice::~cDevice()
DetachAllReceivers();
delete liveSubtitle;
delete dvbSubtitleConverter;
delete nitFilter;
delete sdtFilter;
delete patFilter;
delete eitFilter;
delete sectionHandler;
delete pesAssembler;
}
@ -650,6 +645,22 @@ void cDevice::StartSectionHandler(void)
}
}
void cDevice::StopSectionHandler(void)
{
if (sectionHandler) {
delete nitFilter;
delete sdtFilter;
delete patFilter;
delete eitFilter;
delete sectionHandler;
nitFilter = NULL;
sdtFilter = NULL;
patFilter = NULL;
eitFilter = NULL;
sectionHandler = NULL;
}
}
int cDevice::OpenFilter(u_short Pid, u_char Tid, u_char Mask)
{
return -1;

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: device.h 1.88 2008/02/08 13:48:31 kls Exp $
* $Id: device.h 1.89 2008/02/09 16:05:24 kls Exp $
*/
#ifndef __DEVICE_H
@ -302,7 +302,12 @@ private:
protected:
void StartSectionHandler(void);
///< A derived device that provides section data must call
///< this function to actually set up the section handler.
///< this function (typically in its constructor) to actually set
///< up the section handler.
void StopSectionHandler(void);
///< A device that has called StartSectionHandler() must call this
///< function (typically in its destructor) to stop the section
///< handler.
public:
virtual int OpenFilter(u_short Pid, u_char Tid, u_char Mask);
///< Opens a file handle for the given filter data.

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.169 2008/02/08 13:48:31 kls Exp $
* $Id: dvbdevice.c 1.170 2008/02/09 16:11:44 kls Exp $
*/
#include "dvbdevice.h"
@ -433,6 +433,7 @@ cDvbDevice::cDvbDevice(int n)
cDvbDevice::~cDvbDevice()
{
StopSectionHandler();
delete spuDecoder;
delete dvbTuner;
delete ciAdapter;