[vlc-devel] [PATCHv2 13/13] upnp: attach slaves

Thomas Guillem thomas at gllm.fr
Tue May 3 19:02:40 CEST 2016


---
 modules/services_discovery/upnp.cpp | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/modules/services_discovery/upnp.cpp b/modules/services_discovery/upnp.cpp
index 2326b87..93aaeb3 100644
--- a/modules/services_discovery/upnp.cpp
+++ b/modules/services_discovery/upnp.cpp
@@ -876,6 +876,18 @@ bool MediaServer::addItem( IXML_Element* itemElement )
     if ( psz_albumArt != NULL )
         input_item_SetArtworkURL( p_item, psz_albumArt );
 
+    if ( psz_subtitles )
+    {
+        enum slave_type i_type;
+        if ( input_item_slave_GetType( psz_subtitles, &i_type ) )
+        {
+            input_item_slave *p_slave =
+                input_item_slave_New( psz_subtitles, i_type, SLAVE_PRIORITY_MATCH_ALL );
+            if ( p_slave )
+                input_item_AddSlave( p_item, p_slave );
+        }
+    }
+
     input_item_CopyOptions( p_item, node_->p_item );
     input_item_node_AppendItem( node_, p_item );
     input_item_Release( p_item );
-- 
2.8.0.rc3



More information about the vlc-devel mailing list