decoder: SubDecs also need to be paced by the input

Otherwise, a subdec can start rendering while other decoders wait for
the end of the buffering.
This commit is contained in:
Thomas Guillem 2024-07-30 10:08:08 +02:00 committed by Steve Lhomme
parent b3379d35c9
commit 9e107ac696

View File

@ -2647,8 +2647,7 @@ void vlc_input_decoder_ChangeDelay( vlc_input_decoder_t *owner, vlc_tick_t delay
void vlc_input_decoder_StartWait( vlc_input_decoder_t *p_owner )
{
if( p_owner->master_dec != NULL /* SubDecs are paced by their master */
|| vlc_input_decoder_IsSynchronous( p_owner ) )
if ( vlc_input_decoder_IsSynchronous( p_owner ) )
return;
assert( !p_owner->b_waiting );
@ -2663,8 +2662,7 @@ void vlc_input_decoder_StartWait( vlc_input_decoder_t *p_owner )
void vlc_input_decoder_StopWait( vlc_input_decoder_t *p_owner )
{
if( p_owner->master_dec != NULL /* SubDecs are paced by their master */
|| vlc_input_decoder_IsSynchronous( p_owner ) )
if ( vlc_input_decoder_IsSynchronous( p_owner ) )
return;
vlc_fifo_Lock(p_owner->p_fifo);
@ -2676,12 +2674,8 @@ void vlc_input_decoder_StopWait( vlc_input_decoder_t *p_owner )
void vlc_input_decoder_Wait( vlc_input_decoder_t *p_owner )
{
if( p_owner->master_dec != NULL /* SubDecs are paced by their master */
|| vlc_input_decoder_IsSynchronous( p_owner ) )
{
/* Nothing to wait for. There's no decoder thread running. */
if ( vlc_input_decoder_IsSynchronous( p_owner ) )
return;
}
assert( p_owner->b_waiting );
vlc_fifo_Lock(p_owner->p_fifo);