summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrank Schmirler <vdr@schmirler.de>2014-10-24 12:29:49 +0200
committerFrank Schmirler <vdr@schmirler.de>2014-10-24 12:29:49 +0200
commit7df7185e1a719ee29e8a8305f2c91393a6cfb542 (patch)
treeec4bc23c809a57f39b140fd5e55e53d23ce96c3e
parentdd556ee7fdaea2ade54e9b6c383f44fa88a483f8 (diff)
downloadvdr-plugin-streamdev-7df7185e1a719ee29e8a8305f2c91393a6cfb542.tar.gz
vdr-plugin-streamdev-7df7185e1a719ee29e8a8305f2c91393a6cfb542.tar.bz2
fixed recplayer issues with large TS files (>4GB)
-rw-r--r--CONTRIBUTORS3
-rw-r--r--HISTORY1
-rw-r--r--server/recplayer.c6
3 files changed, 7 insertions, 3 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 0432480..63c6874 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -226,3 +226,6 @@ hivdr
hummel99
for reporting and helping to debug channel switch issues with priority > 0
for reporting a race condition when switching the server's LiveTV device
+
+Henrik Niehaus
+ for fixing replay of large TS files on 32-bit systems
diff --git a/HISTORY b/HISTORY
index 6eec8d4..e9abfa0 100644
--- a/HISTORY
+++ b/HISTORY
@@ -1,6 +1,7 @@
VDR Plugin 'streamdev' Revision History
---------------------------------------
+- fixed recplayer issues with large TS files (>4GB)
- Don't abort externremux when internal read buffer is empty
- Implemented remuxing of recordings
- Make ChannelChange retune only if CA IDs changed (thanks to Oliver Wagner)
diff --git a/server/recplayer.c b/server/recplayer.c
index 1b60ef5..52f02d4 100644
--- a/server/recplayer.c
+++ b/server/recplayer.c
@@ -75,7 +75,7 @@ void RecPlayer::scan()
segments[i] = new Segment();
segments[i]->start = totalLength;
fseek(file, 0, SEEK_END);
- totalLength += ftell(file);
+ totalLength += ftello(file);
totalFrames = indexFile->Last();
//log->log("RecPlayer", Log::DEBUG, "File %i found, totalLength now %llu, numFrames = %lu", i, totalLength, totalFrames);
segments[i]->end = totalLength;
@@ -176,7 +176,7 @@ unsigned long RecPlayer::getBlock(unsigned char* buffer, uint64_t position, unsi
uint32_t yetToGet = amount;
uint32_t got = 0;
uint32_t getFromThisSegment = 0;
- uint32_t filePosition;
+ uint64_t filePosition;
while(got < amount)
{
@@ -290,7 +290,7 @@ uint32_t RecPlayer::frameNumberFromPosition(uint64_t position)
if ((position >= segments[segmentNumber]->start) && (position < segments[segmentNumber]->end)) break;
// position is in this block
}
- uint32_t askposition = position - segments[segmentNumber]->start;
+ uint64_t askposition = position - segments[segmentNumber]->start;
return indexFile->Get((int)segmentNumber, askposition);
}