[vlc-devel] [PATCH 4/9] modules: playlist: Implement STREAM_GET_TYPE control query

Hugo Beauzée-Luyssen hugo at beauzee.fr
Wed Sep 16 15:54:12 CEST 2020


---
 modules/demux/playlist/playlist.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/modules/demux/playlist/playlist.c b/modules/demux/playlist/playlist.c
index 1b3a345603..907322fe31 100644
--- a/modules/demux/playlist/playlist.c
+++ b/modules/demux/playlist/playlist.c
@@ -204,5 +204,14 @@ char *ProcessMRL(const char *str, const char *base)
 
 int PlaylistControl( stream_t *p_access, int i_query, va_list args )
 {
-    return access_vaDirectoryControlHelper( p_access, i_query, args );
+    switch ( i_query )
+    {
+        case STREAM_GET_TYPE:
+        {
+            *va_arg( args, enum input_item_type_e* ) = ITEM_TYPE_PLAYLIST;
+            return VLC_SUCCESS;
+        }
+        default:
+            return access_vaDirectoryControlHelper( p_access, i_query, args );
+    }
 }
-- 
2.20.1



More information about the vlc-devel mailing list