Skip to content

Commit

Permalink
input: decoder: use vlc_input_decoder_Flush for CC
Browse files Browse the repository at this point in the history
Separate the early return to make it clear that what follows require a
valid closed-caption decoder.

Then, use vlc_input_decoder_Flush directly, because pf_flush must be
called from the CC decoder thread, and the fifo must be flushed
beforehand, instead of calling it directly.
  • Loading branch information
alexandre-janniaux authored and robUx4 committed Sep 12, 2022
1 parent a6c3e3c commit 3dd0f54
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/input/decoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -1514,8 +1514,10 @@ static void DecoderThread_Flush( vlc_input_decoder_t *p_owner )
for( int i=0; i<MAX_CC_DECODERS; i++ )
{
vlc_input_decoder_t *p_ccowner = p_owner->cc.pp_decoder[i];
if( p_ccowner && p_ccowner->dec.pf_flush )
p_ccowner->dec.pf_flush( &p_ccowner->dec );
if(p_ccowner == NULL)
continue;

vlc_input_decoder_Flush(p_ccowner);
}
}

Expand Down

0 comments on commit 3dd0f54

Please sign in to comment.