[vlc-devel] commit: Fix the type guess: this can be a protocol only if you xan find a : // in it. ( Rémi Duraffort )

git version control git at videolan.org
Sun May 17 03:21:12 CEST 2009


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Sat May 16 23:15:12 2009 +0200| [44d674ddd47b7af1982ca4e81eae073f3ef39e55] | committer: Jean-Baptiste Kempf 

Fix the type guess: this can be a protocol only if you xan find a :// in it.
(and add ftp and smb to the list)

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

 src/input/item.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/input/item.c b/src/input/item.c
index 7ef1138..eac924c 100644
--- a/src/input/item.c
+++ b/src/input/item.c
@@ -788,10 +788,12 @@ static void GuessType( input_item_t *p_item)
         { "dvb", ITEM_TYPE_CARD },
         { "qpsk", ITEM_TYPE_CARD },
         { "sdp", ITEM_TYPE_NET },
+        { "ftp", ITEM_TYPE_NET },
+        { "smb", ITEM_TYPE_NET },
         { NULL, 0 }
     };
 
-    if( !p_item->psz_uri )
+    if( !p_item->psz_uri || !strstr( p_item->psz_uri, "://" ) )
     {
         p_item->i_type = ITEM_TYPE_FILE;
         return;




More information about the vlc-devel mailing list