Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Out of memory in ebur128_set_max_window in 1.2.6 #129

Open
GeorgA opened this issue Jun 27, 2024 · 0 comments
Open

Out of memory in ebur128_set_max_window in 1.2.6 #129

GeorgA opened this issue Jun 27, 2024 · 0 comments

Comments

@GeorgA
Copy link

GeorgA commented Jun 27, 2024

Hi,
I'm not sure if I'm using the calls correctly, but for a 10s window LUFS value in EBUR128_MODE_I , I've used

ebur128_set_max_window(ectx, 10000)

In 1.2.4 this resulted in
st->d->audio_data_frames = st->samplerate * st->d->window / 1000
and it runs fine.

In 1.2.6 it seems that the /1000 is omitted:
safe_size_mul(st->samplerate, window, &new_audio_data_frames)
which gives an insanely big malloc() and runs subsequently in the out of memory killer :(

Simple test:

#include <unistd.h>
#include <ebur128.h>

#define SRATE 48000
#define LUFS_WINDOW 10000

int main(int argc, char **argv) {
    ebur128_state* ectx;

    ectx=ebur128_init(2, SRATE, EBUR128_MODE_I|EBUR128_MODE_LRA);

    ebur128_set_max_window(ectx, LUFS_WINDOW);

    sleep(100);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant