mirror of
https://github.com/rofafor/vdr-plugin-iptv.git
synced 2023-10-10 13:37:03 +02:00
Fixed shutdown crash.
This commit is contained in:
parent
8e979d2940
commit
eb1cd9b01a
4
HISTORY
4
HISTORY
@ -11,3 +11,7 @@ VDR Plugin 'iptv' Revision History
|
|||||||
- Added Spids to channel editor.
|
- Added Spids to channel editor.
|
||||||
- Fixed shutdown logic.
|
- Fixed shutdown logic.
|
||||||
- Improved error checking in protocols.
|
- Improved error checking in protocols.
|
||||||
|
|
||||||
|
2007-xx-xx: Version 0.0.3
|
||||||
|
|
||||||
|
- Fixed shutdown crash.
|
||||||
|
11
common.h
11
common.h
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* See the README file for copyright information and how to reach the author.
|
* See the README file for copyright information and how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: common.h,v 1.13 2007/10/20 23:25:14 ajhseppa Exp $
|
* $Id: common.h,v 1.14 2007/10/22 16:22:11 rahrenbe Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __IPTV_COMMON_H
|
#ifndef __IPTV_COMMON_H
|
||||||
@ -44,6 +44,15 @@
|
|||||||
|
|
||||||
#define ERROR_IF(exp, errstr) ERROR_IF_FUNC(exp, errstr, , );
|
#define ERROR_IF(exp, errstr) ERROR_IF_FUNC(exp, errstr, , );
|
||||||
|
|
||||||
|
#define DELETE_POINTER(ptr, type) \
|
||||||
|
do { \
|
||||||
|
if (ptr) { \
|
||||||
|
type *tmp = ptr; \
|
||||||
|
ptr = NULL; \
|
||||||
|
delete(tmp); \
|
||||||
|
} \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
uint16_t ts_pid(const uint8_t *buf);
|
uint16_t ts_pid(const uint8_t *buf);
|
||||||
uint8_t payload(const uint8_t *tsp);
|
uint8_t payload(const uint8_t *tsp);
|
||||||
const char *id_pid(const u_short Pid);
|
const char *id_pid(const u_short Pid);
|
||||||
|
18
device.c
18
device.c
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* See the README file for copyright information and how to reach the author.
|
* See the README file for copyright information and how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: device.c,v 1.72 2007/10/20 20:35:06 rahrenbe Exp $
|
* $Id: device.c,v 1.73 2007/10/22 16:22:11 rahrenbe Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
@ -45,16 +45,16 @@ cIptvDevice::cIptvDevice(unsigned int Index)
|
|||||||
cIptvDevice::~cIptvDevice()
|
cIptvDevice::~cIptvDevice()
|
||||||
{
|
{
|
||||||
debug("cIptvDevice::~cIptvDevice(%d)\n", deviceIndex);
|
debug("cIptvDevice::~cIptvDevice(%d)\n", deviceIndex);
|
||||||
DELETENULL(pIptvStreamer);
|
DELETE_POINTER(pIptvStreamer, cIptvStreamer);
|
||||||
DELETENULL(pUdpProtocol);
|
DELETE_POINTER(pUdpProtocol, cIptvProtocolUdp);
|
||||||
DELETENULL(pHttpProtocol);
|
DELETE_POINTER(pHttpProtocol, cIptvProtocolHttp);
|
||||||
DELETENULL(pFileProtocol);
|
DELETE_POINTER(pFileProtocol, cIptvProtocolFile);
|
||||||
DELETENULL(pExtProtocol);
|
DELETE_POINTER(pExtProtocol, cIptvProtocolExt);
|
||||||
DELETENULL(tsBuffer);
|
DELETE_POINTER(tsBuffer, cRingBufferLinear);
|
||||||
// Detach and destroy sid filter
|
// Detach and destroy sid filter
|
||||||
if (pSidScanner) {
|
if (pSidScanner) {
|
||||||
Detach(pSidScanner);
|
Detach(pSidScanner);
|
||||||
DELETENULL(pSidScanner);
|
DELETE_POINTER(pSidScanner, cSidScanner);
|
||||||
}
|
}
|
||||||
// Destroy all filters
|
// Destroy all filters
|
||||||
for (int i = 0; i < eMaxSecFilterCount; ++i)
|
for (int i = 0; i < eMaxSecFilterCount; ++i)
|
||||||
@ -103,7 +103,7 @@ cString cIptvDevice::GetGeneralInformation(void)
|
|||||||
deviceIndex, CardIndex(),
|
deviceIndex, CardIndex(),
|
||||||
pIptvStreamer ? *pIptvStreamer->GetInformation() : "",
|
pIptvStreamer ? *pIptvStreamer->GetInformation() : "",
|
||||||
pIptvStreamer ? *pIptvStreamer->GetStatistic() : "",
|
pIptvStreamer ? *pIptvStreamer->GetStatistic() : "",
|
||||||
*cIptvBufferStatistics::GetStatistic(),
|
*cIptvBufferStatistics::GetStatistic(),
|
||||||
*Channels.GetByNumber(cDevice::CurrentChannel())->ToText());
|
*Channels.GetByNumber(cDevice::CurrentChannel())->ToText());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
4
iptv.c
4
iptv.c
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* See the README file for copyright information and how to reach the author.
|
* See the README file for copyright information and how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: iptv.c,v 1.24 2007/10/20 17:26:46 rahrenbe Exp $
|
* $Id: iptv.c,v 1.25 2007/10/22 16:22:11 rahrenbe Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
@ -17,7 +17,7 @@
|
|||||||
#error "VDR-1.5.10 API version or greater is required!"
|
#error "VDR-1.5.10 API version or greater is required!"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static const char *VERSION = "0.0.2";
|
static const char *VERSION = "0.0.3";
|
||||||
static const char *DESCRIPTION = trNOOP("Experience the IPTV");
|
static const char *DESCRIPTION = trNOOP("Experience the IPTV");
|
||||||
|
|
||||||
class cPluginIptv : public cPlugin {
|
class cPluginIptv : public cPlugin {
|
||||||
|
Loading…
Reference in New Issue
Block a user