diff options
author | Frank Schmirler <vdr@schmirler.de> | 2012-05-03 08:30:32 +0200 |
---|---|---|
committer | Frank Schmirler <vdr@schmirler.de> | 2012-05-03 08:30:32 +0200 |
commit | 316ac3344de3051722d9740e0a67855032f66e84 (patch) | |
tree | d23d520b5cb8ced4f0f96df3689cd001d3a2ac6e | |
parent | 8719007f5adb33d563354cec074330647032aac9 (diff) | |
download | vdr-plugin-streamdev-316ac3344de3051722d9740e0a67855032f66e84.tar.gz vdr-plugin-streamdev-316ac3344de3051722d9740e0a67855032f66e84.tar.bz2 |
Use fileno() to retrieve the fd from a FILE structure (fixes #958)
-rw-r--r-- | HISTORY | 2 | ||||
-rw-r--r-- | server/recplayer.c | 2 |
2 files changed, 3 insertions, 1 deletions
@@ -1,6 +1,8 @@ VDR Plugin 'streamdev' Revision History --------------------------------------- +- Use fileno() to retrieve the fd from a FILE structure (submitted by an + anonymous user) - New special meaning "show current channel" when channel 0 is requested. Applies to HTTP streaming only (thanks to Rolf Ahrenberg) - Added streamdev-client support for upcoming streamdev-server versions diff --git a/server/recplayer.c b/server/recplayer.c index 384ac13..35de2b3 100644 --- a/server/recplayer.c +++ b/server/recplayer.c @@ -200,7 +200,7 @@ unsigned long RecPlayer::getBlock(unsigned char* buffer, uint64_t position, unsi if (fread(&buffer[got], getFromThisSegment, 1, file) != 1) return 0; // umm, big problem. // Tell linux not to bother keeping the data in the FS cache - posix_fadvise(file->_fileno, filePosition, getFromThisSegment, POSIX_FADV_DONTNEED); + posix_fadvise(fileno(file), filePosition, getFromThisSegment, POSIX_FADV_DONTNEED); got += getFromThisSegment; currentPosition += getFromThisSegment; |