Commit a3947b18 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

input_item_SetURI: improve warning

parent 7eccf3a2
...@@ -362,12 +362,13 @@ char *input_item_GetURI( input_item_t *p_i ) ...@@ -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 ) void input_item_SetURI( input_item_t *p_i, const char *psz_uri )
{ {
vlc_mutex_lock( &p_i->lock );
#ifndef NDEBUG #ifndef NDEBUG
if( !strstr( psz_uri, "://" ) || strstr( psz_uri, " " ) || strstr( psz_uri, "\"" ) ) if( !strstr( psz_uri, "://" )
fprintf( stderr, "input_item_SetURI() was likely called with a path. FIXME\n" ); || strchr( psz_uri, ' ' ) || strchr( psz_uri, '"' ) )
fprintf( stderr, "Warning: %s(\"%s\"): file path instead of URL.\n",
__func__, psz_uri );
#endif #endif
vlc_mutex_lock( &p_i->lock );
free( p_i->psz_uri ); free( p_i->psz_uri );
p_i->psz_uri = strdup( psz_uri ); p_i->psz_uri = strdup( psz_uri );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment