• 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
..
access.c Loading commit data...
clock.c Loading commit data...
clock.h Loading commit data...
control.c Loading commit data...
decoder.c Loading commit data...
decoder.h Loading commit data...
demux.c Loading commit data...
demux.h Loading commit data...
demux_chained.c Loading commit data...
es_out.c Loading commit data...
es_out.h Loading commit data...
es_out_timeshift.c Loading commit data...
es_out_timeshift.h Loading commit data...
event.c Loading commit data...
event.h Loading commit data...
info.h Loading commit data...
input.c Loading commit data...
input_interface.h Loading commit data...
input_internal.h Loading commit data...
item.c Loading commit data...
item.h Loading commit data...
meta.c Loading commit data...
mrl_helpers.h Loading commit data...
resource.c Loading commit data...
resource.h Loading commit data...
services_discovery.c Loading commit data...
stats.c Loading commit data...
stream.c Loading commit data...
stream.h Loading commit data...
stream_extractor.c Loading commit data...
stream_fifo.c Loading commit data...
stream_filter.c Loading commit data...
stream_memory.c Loading commit data...
subtitles.c Loading commit data...
var.c Loading commit data...
vlm.c Loading commit data...
vlm_event.c Loading commit data...
vlm_event.h Loading commit data...
vlm_internal.h Loading commit data...
vlmshell.c Loading commit data...