mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-22 03:21:00 +00:00
audioloudnorm: Fix limiter buffer index wraparound off-by-one for the last buffer
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1649>
This commit is contained in:
parent
bd2a039c8d
commit
c701aa6f84
1 changed files with 1 additions and 1 deletions
|
@ -753,7 +753,7 @@ impl State {
|
|||
// amount of samples the last frame is short to reach the correct read position.
|
||||
if next_frame_size < FRAME_SIZE {
|
||||
self.limiter_buf_index += FRAME_SIZE - next_frame_size;
|
||||
if self.limiter_buf_index > self.limiter_buf.len() {
|
||||
if self.limiter_buf_index >= self.limiter_buf.len() {
|
||||
self.limiter_buf_index -= self.limiter_buf.len();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue