[vlc-commits] input: Remove dead code

Hugo Beauzée-Luyssen git at videolan.org
Wed Oct 4 11:24:42 CEST 2017


vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Tue Oct  3 18:11:00 2017 +0200| [ef7c26f5a76c1239b17dffb51879ee61753cfce0] | committer: Hugo Beauzée-Luyssen

input: Remove dead code

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

 include/vlc_input.h        |  1 -
 src/input/control.c        | 13 -------------
 src/input/input.c          | 16 ----------------
 src/input/input_internal.h |  2 --
 4 files changed, 32 deletions(-)

diff --git a/include/vlc_input.h b/include/vlc_input.h
index 360539964c..711571b2b4 100644
--- a/include/vlc_input.h
+++ b/include/vlc_input.h
@@ -463,7 +463,6 @@ enum input_query_e
     INPUT_ADD_SLAVE,       /* arg1= enum slave_type, arg2= const char *,
                             * arg3= bool forced, arg4= bool notify,
                             * arg5= bool check_extension */
-    INPUT_ADD_SUBTITLE,    /* arg1= const char *, arg2=bool b_check_extension */
 
     /* On the fly record while playing */
     INPUT_SET_RECORD_STATE, /* arg1=bool    res=can fail */
diff --git a/src/input/control.c b/src/input/control.c
index 29f516208c..8d9ffc0b8a 100644
--- a/src/input/control.c
+++ b/src/input/control.c
@@ -450,19 +450,6 @@ int input_vaControl( input_thread_t *p_input, int i_query, va_list args )
             return VLC_SUCCESS;
         }
 
-        case INPUT_ADD_SUBTITLE:
-            psz = va_arg( args, char * );
-            b_bool = va_arg( args, int );
-
-            if( !psz || *psz == '\0' )
-                return VLC_EGENERIC;
-            if( b_bool && !subtitles_Filter( psz ) )
-                return VLC_EGENERIC;
-
-            val.psz_string = strdup( psz );
-            input_ControlPush( p_input, INPUT_CONTROL_ADD_SUBTITLE, &val );
-            return VLC_SUCCESS;
-
         case INPUT_GET_ATTACHMENTS: /* arg1=input_attachment_t***, arg2=int*  res=can fail */
         {
             input_attachment_t ***ppp_attachment = va_arg( args, input_attachment_t *** );
diff --git a/src/input/input.c b/src/input/input.c
index 4d757867c7..6260280e99 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -1690,9 +1690,6 @@ static void ControlRelease( int i_type, vlc_value_t val )
 {
     switch( i_type )
     {
-    case INPUT_CONTROL_ADD_SUBTITLE:
-        free( val.psz_string );
-        break;
     case INPUT_CONTROL_ADD_SLAVE:
         if( val.p_address )
             input_item_slave_Delete( val.p_address );
@@ -2226,19 +2223,6 @@ static bool Control( input_thread_t *p_input,
             break;
         }
 
-        case INPUT_CONTROL_ADD_SUBTITLE:
-            if( val.psz_string )
-            {
-                char *psz_uri = input_SubtitleFile2Uri( p_input, val.psz_string );
-                if( psz_uri != NULL )
-                {
-                    input_SlaveSourceAdd( p_input, SLAVE_TYPE_SPU, psz_uri,
-                                          SLAVE_ADD_FORCED );
-                    free( psz_uri );
-                }
-            }
-            break;
-
         case INPUT_CONTROL_ADD_SLAVE:
             if( val.p_address )
             {
diff --git a/src/input/input_internal.h b/src/input/input_internal.h
index 974271f8a0..af9b35967d 100644
--- a/src/input/input_internal.h
+++ b/src/input/input_internal.h
@@ -228,8 +228,6 @@ enum input_control_e
 
     INPUT_CONTROL_ADD_SLAVE,
 
-    INPUT_CONTROL_ADD_SUBTITLE,
-
     INPUT_CONTROL_SET_RECORD_STATE,
 
     INPUT_CONTROL_SET_FRAME_NEXT,



More information about the vlc-commits mailing list