[vlc-devel] [PATCH 04/18] sout display: implement SOUT_STREAM_IS_SYNCHRONOUS

RĂ©mi Denis-Courmont remi at remlab.net
Sat Oct 10 14:10:47 CEST 2020


---
 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 d91ba8af24..c81802297d 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;
 }
 
-- 
2.28.0



More information about the vlc-devel mailing list