Hi all,
I am updating this topic because the leak seems to come from the "disable timestamp detection" parameter. When I enable it (so when I disable the detection), I no longer see any file descriptor leak.
I am strongly suspecting the eTimeStampParserTS constructor (in timestampts.cpp) and more especially this:
Code
int fd_end=::open(tfilename.c_str(), O_RDONLY|O_LARGEFILE);
if (fd_end>= 0)
{
type = 2; // Endzeit setzen!
pktptr= 0;
needNextPacket = 0;
skip= 0;
off64_t posbegin=::lseek64(fd_end,0, SEEK_END);
::lseek64(fd_end, posbegin - (off64_t)654240, SEEK_SET);
int d1 = dup(fd_end);
char p[65424];
int rd =1;
while ( rd > 0 )
{
rd = ::read(d1, p, 65424);
parseData(p,rd);
}
close(fd_end);
}
Alles anzeigen
The file descriptor d1 returned by dup(fd_end) is never closed.
I'm also wondering if it is really needed to duplicate the descriptor, as it seems possible to always work on fd_end.
I really hope I could have helped with this little investigation