diff --git a/CHANGES.md b/CHANGES.md index 1022c2d478..0f7f5cfb55 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -18,6 +18,7 @@ Fixed: - Make sure reconnection errors are router through the regulat `on_error` callback in `output.icecast` (#3635) - Fixed discontinuity count after a restart in HLS outputs. - Fixed memory leaks when using dynamically created sources (`input.harbor`, `input.ffmepg`, SRT sources and `request.dynamic`) +- Fixed invalid array fill in `add` (#3678) --- diff --git a/src/core/operators/add.ml b/src/core/operators/add.ml index 64d4e92eb1..b6eb03a7eb 100644 --- a/src/core/operators/add.ml +++ b/src/core/operators/add.ml @@ -147,7 +147,7 @@ class audio_add ~renorm ~power ~field tracks = assert (offset <= pos); let audio_offset = Frame.audio_of_main offset in let pcm = Content.Audio.get_data (Frame.get buf field) in - Audio.clear pcm audio_offset (Audio.length pcm); + Audio.clear pcm audio_offset (Audio.length pcm - audio_offset); List.iter (fun { source; fields } -> let tmp = self#track_frame source in