[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
Wed May 20 18:53:44 CEST 2009


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Sat May 16 23:15:12 2009 +0200| [5b676ba1d2022896ef6bf50e4b6de70f751563ac] | committer: Rémi Duraffort 

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=5b676ba1d2022896ef6bf50e4b6de70f751563ac
---

 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