Skip to content

Commit d413771

Browse files
committed
audio: mux: Fix use of incorrect macro
comp_buffer_get_sink_component(b) inside a for_each_producer loop returns mux itself, making the pipeline comparison always false and audio_stream_set_overrun() unreachable. Issue found using semgrep with custom rules. Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
1 parent accf902 commit d413771

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/audio/mux/mux.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ static int demux_trigger(struct processing_module *mod, int cmd)
292292
struct comp_buffer *b;
293293

294294
comp_dev_for_each_producer(mod->dev, b) {
295-
if (comp_buffer_get_sink_component(b)->pipeline != mod->dev->pipeline)
295+
if (comp_buffer_get_source_component(b)->pipeline != mod->dev->pipeline)
296296
audio_stream_set_overrun(&b->stream, true);
297297
}
298298
}

0 commit comments

Comments
 (0)