mirror of
https://github.com/rofafor/vdr-plugin-iptv.git
synced 2023-10-10 13:37:03 +02:00
Fifo shouldn't be opened as write-only, if there're no readers.
This commit is contained in:
parent
501701e3d3
commit
9ec10262d4
5
device.c
5
device.c
@ -23,7 +23,8 @@ cIptvDevice::cIptvDevice(unsigned int Index)
|
||||
pidScanEnabled(false),
|
||||
mutex()
|
||||
{
|
||||
debug("cIptvDevice::cIptvDevice(%d)\n", deviceIndex);
|
||||
//debug("cIptvDevice::cIptvDevice(%d)\n", deviceIndex);
|
||||
isyslog("creating IPTV device %d (CardIndex=%d)", deviceIndex, CardIndex());
|
||||
tsBuffer = new cRingBufferLinear(MEGABYTE(IptvConfig.GetTsBufferSize()),
|
||||
(TS_SIZE * IptvConfig.GetReadBufferTsCount()),
|
||||
false, "IPTV");
|
||||
@ -48,7 +49,7 @@ cIptvDevice::cIptvDevice(unsigned int Index)
|
||||
cString filename = cString::sprintf(IPTV_DVR_FILENAME, deviceIndex);
|
||||
stat(filename, &sb);
|
||||
if (S_ISFIFO(sb.st_mode)) {
|
||||
dvrFd = open(filename, O_WRONLY | O_NONBLOCK);
|
||||
dvrFd = open(filename, O_RDWR | O_NONBLOCK);
|
||||
if (dvrFd >= 0)
|
||||
dsyslog("IPTV device %d redirecting input stream to '%s'", deviceIndex, *filename);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user