git.videolan.org
/
vlc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
de31813
)
Don't pop the string before using it (else our pointer points to garbage) and add...
author
Antoine Cellerier
<dionoea@videolan.org>
Sun, 4 Nov 2007 22:40:00 +0000
(22:40 +0000)
committer
Antoine Cellerier
<dionoea@videolan.org>
Sun, 4 Nov 2007 22:40:00 +0000
(22:40 +0000)
modules/misc/lua/vlc.c
patch
|
blob
|
history
diff --git
a/modules/misc/lua/vlc.c
b/modules/misc/lua/vlc.c
index
eb07f4f
..
6299cea
100644
(file)
--- a/
modules/misc/lua/vlc.c
+++ b/
modules/misc/lua/vlc.c
@@
-180,11
+180,11
@@
int vlclua_stream_new( lua_State *L )
vlc_object_t * p_this = vlclua_get_this( L );
stream_t * p_stream;
const char * psz_url;
- if( lua_gettop( L ) != 1 ) return vlclua_error( L );
psz_url = luaL_checkstring( L, -1 );
- lua_pop( L, 1 );
p_stream = stream_UrlNew( p_this, psz_url );
- if( !p_stream ) return vlclua_error( L );
+ if( !p_stream )
+ return luaL_error( L, "Error when opening url: `%s'", psz_url );
+ lua_pop( L, 1 );
lua_pushlightuserdata( L, p_stream );
return 1;
}