From: Good Guy Date: Thu, 25 May 2023 14:37:07 +0000 (-0600) Subject: Prevent delay audio plugin from crashing X-Git-Tag: 2023-06~6 X-Git-Url: https://git.cinelerra-gg.org/git/?a=commitdiff_plain;h=b2d07362d3393d770098fc4e9a17ddf489a1b632;p=goodguy%2Fcinelerra.git Prevent delay audio plugin from crashing --- diff --git a/cinelerra-5.1/plugins/delayaudio/delayaudio.C b/cinelerra-5.1/plugins/delayaudio/delayaudio.C index 22c32f62..9396db81 100644 --- a/cinelerra-5.1/plugins/delayaudio/delayaudio.C +++ b/cinelerra-5.1/plugins/delayaudio/delayaudio.C @@ -136,8 +136,7 @@ void DelayAudio::reconfigure() if(buffer) { - int size = MIN(new_allocation, allocation); - + int size = new_allocation; memcpy(new_buffer->get_data(), buffer->get_data(), (size - PluginClient::in_buffer_size) * sizeof(double)); @@ -154,7 +153,8 @@ int DelayAudio::process_realtime(int64_t size, Samples *input_ptr, Samples *outp { load_configuration(); - if(need_reconfigure) reconfigure(); +// if(need_reconfigure) reconfigure(); + reconfigure(); // printf("DelayAudio::process_realtime %d %d\n", // input_start, size);