From f75b83ef039adf04f7e4af7c0e61062978e8950e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Denis-Courmont?= <remi@remlab.net> Date: Sat, 10 Oct 2020 14:05:49 +0300 Subject: [PATCH] sout display: implement SOUT_STREAM_IS_SYNCHRONOUS --- modules/stream_out/display.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/modules/stream_out/display.c b/modules/stream_out/display.c index d91ba8af248c..c81802297d89 100644 --- a/modules/stream_out/display.c +++ b/modules/stream_out/display.c @@ -144,14 +144,24 @@ static int Send( sout_stream_t *p_stream, void *id, block_t *p_buffer ) static int Control( sout_stream_t *p_stream, int i_query, va_list args ) { - if( i_query == SOUT_STREAM_ID_SPU_HIGHLIGHT ) + switch (i_query) { - vlc_input_decoder_t *p_dec = va_arg(args, void *); - void *spu_hl = va_arg(args, void *); - return vlc_input_decoder_SetSpuHighlight( p_dec, spu_hl ); + case SOUT_STREAM_ID_SPU_HIGHLIGHT: + { + vlc_input_decoder_t *p_dec = va_arg(args, void *); + void *spu_hl = va_arg(args, void *); + return vlc_input_decoder_SetSpuHighlight( p_dec, spu_hl ); + } + + case SOUT_STREAM_IS_SYNCHRONOUS: + *va_arg(args, bool *) = true; + break; + + default: + return VLC_EGENERIC; } (void) p_stream; - return VLC_EGENERIC; + return VLC_SUCCESS; } static const struct sout_stream_operations ops = { @@ -186,8 +196,6 @@ static int Open( vlc_object_t *p_this ) p_stream->ops = &ops; p_stream->p_sys = p_sys; - p_stream->pace_nocontrol = true; - return VLC_SUCCESS; } -- GitLab