cant shift more than what we have

This commit is contained in:
Ahmet Inan 2024-04-30 22:40:50 +02:00
parent 1a7c2d341f
commit 97820b504a

View file

@ -216,7 +216,7 @@ public class Decoder {
}
private void shiftSamples(int shift) {
if (shift <= 0)
if (shift <= 0 || shift > curSample)
return;
lastSyncPulseIndex -= shift;
adjustSyncPulses(last5msSyncPulses, shift);