[vlc-commits] Revert "input: item: do NOT preparse unknown access (fix #16823)"

Rémi Denis-Courmont git at videolan.org
Wed Apr 13 21:26:46 CEST 2016


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Apr 13 22:25:58 2016 +0300| [8bcf4ec4251fb6dda1aaa098588b7e51d475ee30] | committer: Rémi Denis-Courmont

Revert "input: item: do NOT preparse unknown access (fix #16823)"

This reverts commit 8c43e3644c6d6ae9128dc543f50b9c20b6f85fdf, which
breaks the test suite.

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

 src/input/item.c |   26 +++++++++++---------------
 1 file changed, 11 insertions(+), 15 deletions(-)

diff --git a/src/input/item.c b/src/input/item.c
index 8fb345e..2b811da 100644
--- a/src/input/item.c
+++ b/src/input/item.c
@@ -1073,26 +1073,22 @@ static int GuessType( const input_item_t *p_item, bool *p_net )
         { "vcd",    ITEM_TYPE_DISC, false },
         { "window", ITEM_TYPE_CARD, false },
     };
-    int i_item_type = ITEM_TYPE_UNKNOWN;
-    *p_net = false;
+    const struct item_type_entry *e;
 
     if( !strstr( p_item->psz_uri, "://" ) )
+        return ITEM_TYPE_FILE;
+
+    e = bsearch( p_item->psz_uri, tab, sizeof( tab ) / sizeof( tab[0] ),
+                 sizeof( tab[0] ), typecmp );
+    if( e )
     {
-        i_item_type = ITEM_TYPE_FILE;
-    }
-    else
+        *p_net = e->b_net;
+        return e->i_type;
+    } else
     {
-        const struct item_type_entry *e =
-            bsearch( p_item->psz_uri, tab, sizeof( tab ) / sizeof( tab[0] ),
-                     sizeof( tab[0] ), typecmp );
-        if( e )
-        {
-            *p_net = e->b_net;
-            return e->i_type;
-        }
+        *p_net = false;
+        return ITEM_TYPE_FILE;
     }
-
-    return i_item_type;
 }
 
 input_item_node_t *input_item_node_Create( input_item_t *p_input )



More information about the vlc-commits mailing list