mirror of
https://projects.vdr-developer.org/git/vdr-plugin-streamdev.git
synced 2023-10-10 19:16:51 +02:00
Use fileno() to retrieve the fd from a FILE structure (fixes #958)
This commit is contained in:
parent
8719007f5a
commit
316ac3344d
2
HISTORY
2
HISTORY
@ -1,6 +1,8 @@
|
|||||||
VDR Plugin 'streamdev' Revision History
|
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.
|
- New special meaning "show current channel" when channel 0 is requested.
|
||||||
Applies to HTTP streaming only (thanks to Rolf Ahrenberg)
|
Applies to HTTP streaming only (thanks to Rolf Ahrenberg)
|
||||||
- Added streamdev-client support for upcoming streamdev-server versions
|
- Added streamdev-client support for upcoming streamdev-server versions
|
||||||
|
@ -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.
|
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
|
// 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;
|
got += getFromThisSegment;
|
||||||
currentPosition += getFromThisSegment;
|
currentPosition += getFromThisSegment;
|
||||||
|
Loading…
Reference in New Issue
Block a user