[vlc-commits] modules: playlist: Implement STREAM_GET_TYPE control query

Hugo Beauzée-Luyssen git at videolan.org
Thu Sep 17 17:53:34 CEST 2020


vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Mon Sep 14 17:57:42 2020 +0200| [4d4ef12ace288f298beb2d0de81130b58a2d3548] | committer: Hugo Beauzée-Luyssen

modules: playlist: Implement STREAM_GET_TYPE control query

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

 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..b5222c0465 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, int* ) = ITEM_TYPE_PLAYLIST;
+            return VLC_SUCCESS;
+        }
+        default:
+            return access_vaDirectoryControlHelper( p_access, i_query, args );
+    }
 }



More information about the vlc-commits mailing list