mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-12-01 07:51:01 +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/1650>
This commit is contained in:
parent
1a8a1dcf17
commit
9693aa6cc5
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