[vlc-commits] es_out: fix spu track always marked as forced

Thomas Guillem git at videolan.org
Thu Jul 19 10:47:17 CEST 2018


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Jul 19 10:41:59 2018 +0200| [97d12b9d1cdb3a77ff82d4529016a328b115509a] | committer: Thomas Guillem

es_out: fix spu track always marked as forced

fixup of cfea200c8c7596de07d9e4b7bb88f993015939be

The second arg of ES_OUT_SET_ES_BY_ID was ignored (and was false for input
slaves).

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=97d12b9d1cdb3a77ff82d4529016a328b115509a
---

 src/input/es_out.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/input/es_out.c b/src/input/es_out.c
index eb4f40f23b..0d763769ed 100644
--- a/src/input/es_out.c
+++ b/src/input/es_out.c
@@ -1764,7 +1764,7 @@ static void EsSelect( es_out_t *out, es_out_id_t *es )
                 return;
             }
         }
-        if( es->fmt.i_cat == SPU_ES )
+        if( !es->b_forced && es->fmt.i_cat == SPU_ES )
         {
             if( !var_GetBool( p_input, b_sout ? "sout-spu" : "spu" ) )
             {
@@ -2684,8 +2684,7 @@ static int EsOutControlLocked( es_out_t *out, int i_query, va_list args )
         switch( i_query )
         {
         case ES_OUT_SET_ES_BY_ID:         i_new_query = ES_OUT_SET_ES;
-            if( i_id >= 0 )
-                p_es->b_forced = true;
+            p_es->b_forced = va_arg( args, int );
             break;
         case ES_OUT_RESTART_ES_BY_ID:     i_new_query = ES_OUT_RESTART_ES; break;
         case ES_OUT_SET_ES_DEFAULT_BY_ID: i_new_query = ES_OUT_SET_ES_DEFAULT; break;



More information about the vlc-commits mailing list