Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
input: decoder: fix drain/flush execution order
This fixes a possible (but unlikely) assert, from vlc_aout_stream_Drain(): assert(atomic_load_explicit(&stream->drain_deadline, memory_order_relaxed) == VLC_TICK_INVALID); It can happen when vlc_aout_stream_Drain() is called more than time in a row, that is illegal: Drain should be the last command or can be cancelled by a Flush to continue the playback. If drain and flush are called in that order - vlc_input_decoder_Drain() - vlc_input_decoder_Flush() - vlc_input_decoder_Drain() It was possible that vlc_aout_stream_Flush() was called before the first vlc_input_decoder_Drain(). To fix this issue, cancel the draining state when flushing the decoder and do check that the decoder is still draining after unlocking/locking (after draining the decoder module). Regression from 34a548c Fixes #27499
- Loading branch information