LibMedia: Remove an unnecessary lock in the audio sink's state dispatch

Both fields used in the deferred invoke are written by the main thread,
we shouldn't need to worry about a race here.
This commit is contained in:
Zaggy1024 2026-06-09 17:20:36 -05:00 committed by Gregory Bertilson
parent d0edc33597
commit eeeabcaef1

View file

@ -390,7 +390,6 @@ void AudioPlaybackSink::OutputThreadData::dispatch_state_if_changed(PipelineStat
return;
m_last_dispatched_status = status;
m_main_thread_event_loop.deferred_invoke([self = NonnullRefPtr(*this), status, seek_id] {
Sync::MutexLocker locker { self->m_output_mutex };
if (self->m_seek_id != seek_id)
return;
if (self->m_on_state_changed)