From f268988354cf5292216832f742462a770de69ed9 Mon Sep 17 00:00:00 2001 From: Thulinma Date: Mon, 16 Nov 2015 16:15:52 +0100 Subject: [PATCH] Fixed buffer incorrectly nulling indexes for live streams. --- src/input/input_buffer.cpp | 2 +- src/io.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/input/input_buffer.cpp b/src/input/input_buffer.cpp index 331d51f6..e992159a 100644 --- a/src/input/input_buffer.cpp +++ b/src/input/input_buffer.cpp @@ -111,7 +111,7 @@ namespace Mist { //Find page in indexpage and null it for (int i = 0; i < 8192; i += 8) { unsigned int thisKeyNum = ((((long long int *)(metaPages[tid].mapped + i))[0]) >> 32) & 0xFFFFFFFF; - if (thisKeyNum == htonl(pagesByTrack[tid].begin()->first) && ((((long long int *)(metaPages[tid].mapped + i))[0]) != 0)) { + if (thisKeyNum == htonl(bufferLocations[tid].begin()->first) && ((((long long int *)(metaPages[tid].mapped + i))[0]) != 0)){ (((long long int *)(metaPages[tid].mapped + i))[0]) = 0; } } diff --git a/src/io.cpp b/src/io.cpp index 6dd2798d..81570549 100644 --- a/src/io.cpp +++ b/src/io.cpp @@ -130,7 +130,7 @@ namespace Mist { } unsigned long mapTid = trackMap[tid]; if (!pagesByTrack.count(tid)){ - //The buffer does not control the datapages, indicated by no pagesByTrack entry. + // If there is no pagesByTrack entry, the pages are managed in local code and not through io.cpp (e.g.: MistInBuffer) return; } //If the given pagenumber is not a valid page on this track, do nothing