stream out: display: add explicit input decoder flush

Ensure the input_decoder is flushed before deletion, so that it's not
stuck waiting on the decoder implementation or the output for the ES.

The end goal is to simplify vlc_input_decoder_Delete to ensure it is
either flushed or drained before being deleted, so that the wanted
behaviour is written in the code and frames are neither dropped when
they should have been played, nor drained during interruption, resulting
in increased response time.
This commit is contained in:
Alexandre Janniaux 2023-03-16 16:23:24 +01:00 committed by Steve Lhomme
parent 23a0ea4b4e
commit 13ffce3086
1 changed files with 1 additions and 0 deletions

View File

@ -136,6 +136,7 @@ static void Del( sout_stream_t *p_stream, void *id )
(void) p_stream;
sout_stream_id_sys_t *id_sys = id;
vlc_input_decoder_Flush(id_sys->dec);
vlc_input_decoder_Delete( id_sys->dec );
sout_ClockDelete( id_sys->clock );
free( id_sys );