mirror of
https://github.com/rofafor/vdr-plugin-iptv.git
synced 2023-10-10 13:37:03 +02:00
Fixed channel switching in UDP protocol.
This commit is contained in:
parent
4c39d8cf72
commit
ff84c54d50
1
HISTORY
1
HISTORY
@ -162,3 +162,4 @@ VDR Plugin 'iptv' Revision History
|
||||
2012-03-25: Version 0.5.1
|
||||
|
||||
- Updated for vdr-1.7.27.
|
||||
- Fixed channel switching in UDP protocol.
|
||||
|
2
config.c
2
config.c
@ -42,6 +42,6 @@ void cIptvConfig::SetDisabledFilters(unsigned int Index, int Number)
|
||||
|
||||
void cIptvConfig::SetConfigDirectory(const char *directoryP)
|
||||
{
|
||||
debug("cIptvConfig::SetConfigDirectory(%s)", directoryP);
|
||||
debug("cIptvConfig::SetConfigDirectory(%s)\n", directoryP);
|
||||
ERROR_IF(!realpath(directoryP, configDirectory), "Cannot canonicalize configuration directory");
|
||||
}
|
||||
|
@ -37,7 +37,7 @@ cIptvProtocolUdp::~cIptvProtocolUdp()
|
||||
|
||||
bool cIptvProtocolUdp::Open(void)
|
||||
{
|
||||
debug("cIptvProtocolUdp::Open()\n");
|
||||
debug("cIptvProtocolUdp::Open(): sourceAddr=%s streamAddr=%s\n", sourceAddr, streamAddr);
|
||||
OpenSocket(socketPort, isempty(sourceAddr) ? INADDR_ANY : inet_addr(sourceAddr));
|
||||
if (!isempty(streamAddr)) {
|
||||
// Join a new multicast group
|
||||
@ -48,7 +48,7 @@ bool cIptvProtocolUdp::Open(void)
|
||||
|
||||
bool cIptvProtocolUdp::Close(void)
|
||||
{
|
||||
debug("cIptvProtocolUdp::Close()\n");
|
||||
debug("cIptvProtocolUdp::Close(): sourceAddr=%s streamAddr=%s\n", sourceAddr, streamAddr);
|
||||
if (!isempty(streamAddr)) {
|
||||
// Drop the multicast group
|
||||
OpenSocket(socketPort, isempty(sourceAddr) ? INADDR_ANY : inet_addr(sourceAddr));
|
||||
@ -56,9 +56,9 @@ bool cIptvProtocolUdp::Close(void)
|
||||
}
|
||||
// Close the socket
|
||||
CloseSocket();
|
||||
// Reset stream and source addresses
|
||||
streamAddr = strcpyrealloc(streamAddr, "");
|
||||
sourceAddr = strcpyrealloc(sourceAddr, "");
|
||||
// Do NOT reset stream and source addresses
|
||||
//streamAddr = strcpyrealloc(streamAddr, "");
|
||||
//sourceAddr = strcpyrealloc(sourceAddr, "");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user