Skip to content

pipewire: don't drain empty streams

Thomas Guillem requested to merge tguillem/vlc:pw-drain-flush into master

Fixes the following assert when seeking more than one time past the end of the file.

src/audio_output/dec.c:1107: vlc_aout_stream_Drain: Assertion `!atomic_load_explicit(&stream->drained, memory_order_relaxed)' failed.

Calling pw_stream_flush(s->stream, true), when empty, leads to undefined behavior and might cause the stream_drained() callback to be called in loop (leading to the mentioned assert after a flush).

Edited by Thomas Guillem

Merge request reports

Loading