• Thomas Guillem's avatar
    decoder: fix occasional deadlock on seek · 8cacc98a
    Thomas Guillem authored
    This commit fixes the following deadlock:
    
    The input thread (from input_DecoderWait()) reads p_owner->b_idle, and wait on
    the wait_acknowledge condition variable because p_owner->b_idle is false (and
    because p_owner->b_has_data is false too). The decoder thread sets
    p_owner->b_idle to true because the fifo is empty and wait on the fifo
    condition variable. Both threads are waiting each others, hence the deadlock.
    
    To fix this issue, signal the input thread from the decoder thread after
    setting p_owner->b_idle to true.
    
    Since predictable scheduling behavior is not required, p_owner->lock doesn't
    have to be held while signaling p_owner->wait_acknowledge.
    
    Fixes #16100
    8cacc98a
Name
Last commit
Last update
..
android Loading commit data...
audio_output Loading commit data...
config Loading commit data...
darwin Loading commit data...
extras Loading commit data...
input Loading commit data...
interface Loading commit data...
linux Loading commit data...
misc Loading commit data...
modules Loading commit data...
network Loading commit data...
os2 Loading commit data...
playlist Loading commit data...
posix Loading commit data...
stream_output Loading commit data...
test Loading commit data...
text Loading commit data...
video_output Loading commit data...
win32 Loading commit data...
.gitignore Loading commit data...
Makefile.am Loading commit data...
check_headers Loading commit data...
check_symbols Loading commit data...
libvlc-module.c Loading commit data...
libvlc.c Loading commit data...
libvlc.h Loading commit data...
libvlc_win32_rc.rc.in Loading commit data...
libvlccore.sym Loading commit data...
missing.c Loading commit data...
version.c Loading commit data...
vlc-plugin.pc.in Loading commit data...