1
0
mirror of https://github.com/rofafor/vdr-plugin-iptv.git synced 2023-10-10 13:37:03 +02:00

Reset timeout if channel locking fails.

This commit is contained in:
Rolf Ahrenberg 2008-02-01 21:58:22 +00:00
parent a03bd6309c
commit 16b40c6774
2 changed files with 5 additions and 2 deletions

View File

@ -46,3 +46,4 @@ VDR Plugin 'iptv' Revision History
- Added preliminary automatic Pid scanning functionality.
- Modified channels.conf format to enable/disable channel
specific pid and sid scanning functionality.
- Removed the general sid scanning setup option.

View File

@ -3,7 +3,7 @@
*
* See the README file for copyright information and how to reach the author.
*
* $Id: pidscanner.c,v 1.2 2008/02/01 21:54:24 rahrenbe Exp $
* $Id: pidscanner.c,v 1.3 2008/02/01 21:58:22 rahrenbe Exp $
*/
#include "common.h"
@ -84,8 +84,10 @@ void cPidScanner::Process(const uint8_t* buf)
}
}
if (numVpids > 10 && numApids > 5) {
if (!Channels.Lock(true, 10))
if (!Channels.Lock(true, 10)) {
timeout.Set(PIDSCANNER_TIMEOUT_IN_MS);
return;
}
debug("cPidScanner::Process(): Vpid=0x%04X, Apid=0x%04X\n", Vpid, Apid);
cChannel *IptvChannel = Channels.GetByChannelID(channel.GetChannelID());
int Apids[MAXAPIDS + 1] = { 0 }; // these lists are zero-terminated