[vlc-devel] commit: input_item_SetURI: improve warning ( Rémi Denis-Courmont )

git version control git at videolan.org
Thu Feb 18 19:12:50 CET 2010


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Feb 18 20:12:23 2010 +0200| [a3947b183302a6a1a5fab53b10e176a417db363c] | committer: Rémi Denis-Courmont 

input_item_SetURI: improve warning

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

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

diff --git a/src/input/item.c b/src/input/item.c
index 29446ae..cdc60ed 100644
--- a/src/input/item.c
+++ b/src/input/item.c
@@ -362,12 +362,13 @@ char *input_item_GetURI( input_item_t *p_i )
 }
 void input_item_SetURI( input_item_t *p_i, const char *psz_uri )
 {
-    vlc_mutex_lock( &p_i->lock );
 #ifndef NDEBUG
-    if( !strstr( psz_uri, "://" ) || strstr( psz_uri, " " ) || strstr( psz_uri, "\"" ) )
-        fprintf( stderr, "input_item_SetURI() was likely called with a path. FIXME\n" );
+    if( !strstr( psz_uri, "://" )
+     || strchr( psz_uri, ' ' ) || strchr( psz_uri, '"' ) )
+        fprintf( stderr, "Warning: %s(\"%s\"): file path instead of URL.\n",
+                 __func__, psz_uri );
 #endif
-
+    vlc_mutex_lock( &p_i->lock );
     free( p_i->psz_uri );
     p_i->psz_uri = strdup( psz_uri );
 




More information about the vlc-devel mailing list