From 16f08cfde0c9392258af5b8ef36913580be5ad02 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Thu, 15 May 2014 01:09:38 -0700 Subject: [PATCH] Oops, always grab the first, not latest, audio pts. In case it wraps around. --- Core/HW/BufferQueue.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Core/HW/BufferQueue.h b/Core/HW/BufferQueue.h index 3c58005357..79e7072f19 100644 --- a/Core/HW/BufferQueue.h +++ b/Core/HW/BufferQueue.h @@ -163,13 +163,10 @@ private: u64 pts = findPts(earliest, latest); // If it wraps around, we have to look at the other half too. - if (start + packetSize > bufQueueSize) { + if (pts == 0 && start + packetSize > bufQueueSize) { earliest = ptsMarks.begin(); latest = ptsMarks.lower_bound(start + packetSize - bufQueueSize); - u64 pts2 = findPts(earliest, latest); - if (pts2 != 0) { - pts = pts2; - } + return findPts(earliest, latest); } return pts;