[vlc-devel] [PATCH] es_out: inverse if check

Thomas Guillem thomas at gllm.fr
Wed Jun 26 13:32:25 CEST 2019


Since var_GetBool() is way longuer to process.
---
 src/input/es_out.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/input/es_out.c b/src/input/es_out.c
index 7e9ac98d3d..ffcac69623 100644
--- a/src/input/es_out.c
+++ b/src/input/es_out.c
@@ -2105,7 +2105,8 @@ static void EsOutSelectEs( es_out_t *out, es_out_id_t *es )
             }
             else if( es->fmt.i_cat == AUDIO_ES )
             {
-                if( !var_GetBool( p_input, b_sout ? "sout-audio" : "audio" ) || b_thumbnailing )
+                if( b_thumbnailing
+                 || !var_GetBool( p_input, b_sout ? "sout-audio" : "audio" ) )
                 {
                     msg_Dbg( p_input, "audio is disabled, not selecting ES 0x%x",
                              es->fmt.i_id );
@@ -2114,7 +2115,8 @@ static void EsOutSelectEs( es_out_t *out, es_out_id_t *es )
             }
             if( es->fmt.i_cat == SPU_ES )
             {
-                if( !var_GetBool( p_input, b_sout ? "sout-spu" : "spu" ) || b_thumbnailing )
+                if( b_thumbnailing
+                 || !var_GetBool( p_input, b_sout ? "sout-spu" : "spu" ) )
                 {
                     msg_Dbg( p_input, "spu is disabled, not selecting ES 0x%x",
                              es->fmt.i_id );
-- 
2.20.1



More information about the vlc-devel mailing list