Skip to content

Commit

Permalink
input_decoder: guard vlc_aout_stream_Drain()
Browse files Browse the repository at this point in the history
All vlc_aout_stream calls are now guarded by the fifo lock.

Fixes #27508
  • Loading branch information
tguillem authored and jbkempf committed Nov 22, 2022
1 parent facee86 commit fb29fc6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/input/decoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -1791,6 +1791,7 @@ static void *DecoderThread( void *p_data )

DecoderThread_ProcessInput( p_owner, frame );

vlc_fifo_Lock(p_owner->p_fifo);
if( frame == NULL && p_owner->dec.fmt_in->i_cat == AUDIO_ES )
{ /* Draining: the decoder is drained and all decoded buffers are
* queued to the output at this point. Now drain the output. */
Expand All @@ -1799,7 +1800,6 @@ static void *DecoderThread( void *p_data )
}

/* TODO? Wait for draining instead of polling. */
vlc_fifo_Lock(p_owner->p_fifo);
if( p_owner->b_draining && (frame == NULL) )
p_owner->b_draining = false;
vlc_cond_signal( &p_owner->wait_acknowledge );
Expand Down

0 comments on commit fb29fc6

Please sign in to comment.