[vlc-devel] [PATCHv2 09/10] es_out: accept all controls from timeshift

Thomas Guillem thomas at gllm.fr
Thu Feb 27 16:19:16 CET 2020


Directly forward them instead of asserting.

This will allow the es_out client (the input_thread_t) to always use the top
level es_out without having to wonder if a call is legal on the display or the
timeshift es_out.
---
 src/input/es_out_timeshift.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/input/es_out_timeshift.c b/src/input/es_out_timeshift.c
index f51305e1396..e3f377a54b3 100644
--- a/src/input/es_out_timeshift.c
+++ b/src/input/es_out_timeshift.c
@@ -741,7 +741,7 @@ static int PrivControlLocked( es_out_t *p_out, int i_query, va_list args )
 
     switch( i_query )
     {
-    /* Pass-through control */
+    /* Pass-through controls that can be delayed */
     case ES_OUT_PRIV_SET_MODE:
     case ES_OUT_PRIV_SET_TIMES:
     case ES_OUT_PRIV_SET_JITTER:
@@ -786,13 +786,13 @@ static int PrivControlLocked( es_out_t *p_out, int i_query, va_list args )
     {
         return ControlLockedSetFrameNext( p_out );
     }
+    /* Direct pass-through controls */
     case ES_OUT_PRIV_GET_GROUP_FORCED:
-        return es_out_vaPrivControl( p_sys->p_out, i_query, args );
-    /* Invalid queries for this es_out level */
     case ES_OUT_PRIV_SET_ES:
     case ES_OUT_PRIV_UNSET_ES:
     case ES_OUT_PRIV_RESTART_ES:
     case ES_OUT_PRIV_SET_ES_LIST:
+    case ES_OUT_PRIV_SET_AUTOSELECT:
     case ES_OUT_PRIV_SET_ES_BY_ID:
     case ES_OUT_PRIV_RESTART_ES_BY_ID:
     case ES_OUT_PRIV_SET_ES_DEFAULT_BY_ID:
@@ -803,6 +803,7 @@ static int PrivControlLocked( es_out_t *p_out, int i_query, va_list args )
     case ES_OUT_PRIV_SET_RECORD_STATE:
     case ES_OUT_PRIV_SET_VBI_PAGE:
     case ES_OUT_PRIV_SET_VBI_TRANSPARENCY:
+        return es_out_vaPrivControl( p_sys->p_out, i_query, args );
     default: vlc_assert_unreachable();
     }
 }
-- 
2.20.1



More information about the vlc-devel mailing list