From 6c28242aff68912bf2d216f6d9b7b13e6bfd00ac Mon Sep 17 00:00:00 2001 From: TYW_espressif <1282774035@qq.com> Date: Wed, 26 Feb 2025 15:26:57 +0800 Subject: [PATCH] audio_pipeline : Fixed a bug that caused an element to be linked to an uninitialized ring buffer when there was only a single element in the pipeline. Closes https://github.com/espressif/esp-adf/pull/1386 Closes https://github.com/espressif/esp-adf/issues/1341 --- components/audio_pipeline/audio_pipeline.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/components/audio_pipeline/audio_pipeline.c b/components/audio_pipeline/audio_pipeline.c index 8be8365ce..5ba2e161c 100644 --- a/components/audio_pipeline/audio_pipeline.c +++ b/components/audio_pipeline/audio_pipeline.c @@ -462,6 +462,9 @@ static esp_err_t _pipeline_rb_linked(audio_pipeline_handle_t pipeline, audio_ele { static ringbuf_handle_t rb; ringbuf_item_t *rb_item; + if (first) { + rb = NULL; + } if (last) { audio_element_set_input_ringbuf(el, rb); } else {