[vlc-commits] input/item: fix b_net not initialized correctly

Thomas Guillem git at videolan.org
Thu Apr 14 10:21:24 CEST 2016


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Apr 13 19:00:16 2016 +0200| [f7d37fe19d8fd2c6ce1ad5b11e413f6db5bb0019] | committer: Thomas Guillem

input/item: fix b_net not initialized correctly

Do not override b_net guessed by GuessType. Init b_net to false when there is
no psz_uri.

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

 src/input/item.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/input/item.c b/src/input/item.c
index 3a6a20d..937ed91 100644
--- a/src/input/item.c
+++ b/src/input/item.c
@@ -944,7 +944,10 @@ input_item_NewWithTypeExt( const char *psz_uri, const char *psz_name,
     if( psz_uri )
         input_item_SetURI( p_input, psz_uri );
     else
+    {
         p_input->i_type = ITEM_TYPE_UNKNOWN;
+        p_input->b_net = false;
+    }
 
     TAB_INIT( p_input->i_options, p_input->ppsz_options );
     p_input->optflagc = 0;
@@ -977,8 +980,6 @@ input_item_NewWithTypeExt( const char *psz_uri, const char *psz_name,
 
     if( i_net != -1 )
         p_input->b_net = !!i_net;
-    else if( p_input->i_type == ITEM_TYPE_STREAM )
-        p_input->b_net = true;
     return p_input;
 }
 



More information about the vlc-commits mailing list