Loading debian/changelog +8 −0 Original line number Diff line number Diff line mediadb (20260424+78) unstable; urgency=medium * Fix: guard PrefetchBuffer future .wait() calls with .valid() check. Prevents std::future_error "No associated state" crash after .get() consumed the future in read(), then drop/seek loops called .wait(). -- Jan Koester <jan.koester@tuxist.de> Thu, 24 Apr 2026 00:00:00 +0200 mediadb (20260424+77) unstable; urgency=medium * Performance: reduce prefetch block size 256KB→64KB, look-ahead 2MB→256KB, Loading src/preview.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -123,7 +123,7 @@ struct PrefetchBuffer { // drop blocks entirely before pos (after a seek) while (!ring.empty() && ring.front().offset + ring.front().length <= pos) { ring.front().fut.wait(); if (ring.front().fut.valid()) ring.front().fut.wait(); ring.pop_front(); } Loading Loading @@ -168,14 +168,14 @@ struct PrefetchBuffer { auto& b = ring.back(); if (b.offset <= new_pos && new_pos < b.offset + b.length) break; if (b.offset > new_pos) { b.fut.wait(); if (b.fut.valid()) b.fut.wait(); ring.pop_back(); } else { break; } } while (!ring.empty() && ring.front().offset + ring.front().length <= new_pos) { ring.front().fut.wait(); if (ring.front().fut.valid()) ring.front().fut.wait(); ring.pop_front(); } pos = new_pos; Loading Loading
debian/changelog +8 −0 Original line number Diff line number Diff line mediadb (20260424+78) unstable; urgency=medium * Fix: guard PrefetchBuffer future .wait() calls with .valid() check. Prevents std::future_error "No associated state" crash after .get() consumed the future in read(), then drop/seek loops called .wait(). -- Jan Koester <jan.koester@tuxist.de> Thu, 24 Apr 2026 00:00:00 +0200 mediadb (20260424+77) unstable; urgency=medium * Performance: reduce prefetch block size 256KB→64KB, look-ahead 2MB→256KB, Loading
src/preview.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -123,7 +123,7 @@ struct PrefetchBuffer { // drop blocks entirely before pos (after a seek) while (!ring.empty() && ring.front().offset + ring.front().length <= pos) { ring.front().fut.wait(); if (ring.front().fut.valid()) ring.front().fut.wait(); ring.pop_front(); } Loading Loading @@ -168,14 +168,14 @@ struct PrefetchBuffer { auto& b = ring.back(); if (b.offset <= new_pos && new_pos < b.offset + b.length) break; if (b.offset > new_pos) { b.fut.wait(); if (b.fut.valid()) b.fut.wait(); ring.pop_back(); } else { break; } } while (!ring.empty() && ring.front().offset + ring.front().length <= new_pos) { ring.front().fut.wait(); if (ring.front().fut.valid()) ring.front().fut.wait(); ring.pop_front(); } pos = new_pos; Loading