[vlc-devel] [PATCH 4/7] demux: remove DEMUX_IS_PLAYLIST control

RĂ©mi Denis-Courmont remi at remlab.net
Sun Sep 27 12:36:05 CEST 2020


This is always false/unimplemented.
---
 include/vlc_demux.h  | 8 --------
 modules/demux/mock.c | 2 --
 src/input/demux.c    | 4 ----
 src/input/input.c    | 7 +------
 4 files changed, 1 insertion(+), 20 deletions(-)

diff --git a/include/vlc_demux.h b/include/vlc_demux.h
index 090e3acd5e..92fa9618bb 100644
--- a/include/vlc_demux.h
+++ b/include/vlc_demux.h
@@ -251,14 +251,6 @@ enum demux_query_e
      * It should return the value really used in *p_rate */
     DEMUX_SET_RATE,             /* arg1= float*p_rate res=can fail */
 
-    /** Checks whether the stream is actually a playlist, rather than a real
-     * stream.
-     *
-     * Can fail if the stream is not a playlist (same as returning false).
-     *
-     * arg1= bool * */
-    DEMUX_IS_PLAYLIST,
-
     /* Menu (VCD/DVD/BD) Navigation */
     /** Activate the navigation item selected. Can fail */
     DEMUX_NAV_ACTIVATE,
diff --git a/modules/demux/mock.c b/modules/demux/mock.c
index 3ab53b3ef2..aeb46f0d90 100644
--- a/modules/demux/mock.c
+++ b/modules/demux/mock.c
@@ -428,8 +428,6 @@ Control(demux_t *demux, int query, va_list args)
             return VLC_SUCCESS;
         case DEMUX_SET_RATE:
             return sys->can_control_rate ? VLC_SUCCESS : VLC_EGENERIC;
-        case DEMUX_IS_PLAYLIST:
-            return VLC_EGENERIC;
         case DEMUX_NAV_ACTIVATE:
             return VLC_EGENERIC;
         case DEMUX_NAV_UP:
diff --git a/src/input/demux.c b/src/input/demux.c
index 5946013755..44a7c440e7 100644
--- a/src/input/demux.c
+++ b/src/input/demux.c
@@ -331,10 +331,6 @@ int demux_vaControlHelper( stream_t *s,
             }
             return VLC_EGENERIC;
 
-        case DEMUX_IS_PLAYLIST:
-            *va_arg( args, bool * ) = false;
-            return VLC_SUCCESS;
-
         case DEMUX_GET_FPS:
         case DEMUX_HAS_UNSUPPORTED_META:
         case DEMUX_SET_NEXT_DEMUX_TIME:
diff --git a/src/input/input.c b/src/input/input.c
index d28507bd97..f8b52d8b9c 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -495,13 +495,8 @@ static void *Preparse( void *data )
     if( !Init( p_input ) )
     {   /* if the demux is a playlist, call Mainloop that will call
          * demux_Demux in order to fetch sub items */
-        bool b_is_playlist = false;
-
         if ( input_item_ShouldPreparseSubItems( priv->p_item )
-          && demux_Control( priv->master->p_demux, DEMUX_IS_PLAYLIST,
-                            &b_is_playlist ) )
-            b_is_playlist = priv->master->p_demux->pf_readdir != NULL;
-        if( b_is_playlist )
+         && priv->master->p_demux->pf_readdir != NULL )
             MainLoop( p_input, false );
         End( p_input );
     }
-- 
2.28.0



More information about the vlc-devel mailing list