|
From: Lasse Kärkkäi. <tr...@us...> - 2011-07-06 23:35:47
|
Author: Lasse Karkkainen <tro...@tr...>
Date: Wed May 25 04:50:40 2011 +0300
An attempt at fixing the regressions I introduced in commit c0e78b1f19ed2b25c3c37d4cf610939ef33abcab. Not tested.
---
game/ffmpeg.hh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/game/ffmpeg.hh b/game/ffmpeg.hh
index a94a8b0..fd8b381 100644
--- a/game/ffmpeg.hh
+++ b/game/ffmpeg.hh
@@ -162,7 +162,7 @@ class AudioBuffer {
void setDuration(double seconds) { m_duration = seconds; }
bool wantSeek() {
size_t oldest = m_pos - m_data.size();
- return m_posReq + int64_t(m_sps) * 2.0 /* seconds tolerance */ < int64_t(oldest);
+ return m_posReq > 0 && m_posReq + int64_t(m_sps) * 2.0 /* seconds tolerance */ < int64_t(oldest);
}
private:
bool wantMore() { return int64_t(m_pos) - int64_t(m_data.capacity() / 2) < m_posReq; }
|