diff options
Diffstat (limited to 'external/meta-openembedded/meta-multimedia/recipes-multimedia/vlc/vlc/0008-fix-luaL-checkint.patch')
-rw-r--r-- | external/meta-openembedded/meta-multimedia/recipes-multimedia/vlc/vlc/0008-fix-luaL-checkint.patch | 234 |
1 files changed, 94 insertions, 140 deletions
diff --git a/external/meta-openembedded/meta-multimedia/recipes-multimedia/vlc/vlc/0008-fix-luaL-checkint.patch b/external/meta-openembedded/meta-multimedia/recipes-multimedia/vlc/vlc/0008-fix-luaL-checkint.patch index 145e1ab8..96b5d2d2 100644 --- a/external/meta-openembedded/meta-multimedia/recipes-multimedia/vlc/vlc/0008-fix-luaL-checkint.patch +++ b/external/meta-openembedded/meta-multimedia/recipes-multimedia/vlc/vlc/0008-fix-luaL-checkint.patch @@ -5,46 +5,29 @@ Upstream-status: Pending Signed-off-by: Tim Orling <TicoTimo@gmail.com> -Index: vlc-2.2.1/modules/lua/demux.c -=================================================================== ---- vlc-2.2.1.orig/modules/lua/demux.c -+++ vlc-2.2.1/modules/lua/demux.c -@@ -52,7 +52,7 @@ struct demux_sys_t +--- a/modules/lua/demux.c ++++ b/modules/lua/demux.c +@@ -52,7 +52,7 @@ struct vlclua_playlist static int vlclua_demux_peek( lua_State *L ) { - demux_t *p_demux = (demux_t *)vlclua_get_this( L ); + stream_t *s = (stream_t *)vlclua_get_this(L); - int n = luaL_checkint( L, 1 ); + int n = luaL_checkinteger( L, 1 ); const uint8_t *p_peek; - int i_peek = stream_Peek( p_demux->s, &p_peek, n ); -@@ -67,7 +67,7 @@ static int vlclua_demux_read( lua_State + ssize_t val = vlc_stream_Peek(s->p_source, &p_peek, n); +@@ -66,7 +66,7 @@ static int vlclua_demux_peek( lua_State + static int vlclua_demux_read( lua_State *L ) { - demux_t *p_demux = (demux_t *)vlclua_get_this( L ); - const uint8_t *p_read; + stream_t *s = (stream_t *)vlclua_get_this(L); - int n = luaL_checkint( L, 1 ); + int n = luaL_checkinteger( L, 1 ); - int i_read = stream_Peek( p_demux->s, &p_read, n ); + char *buf = malloc(n); - if( i_read > 0 ) -Index: vlc-2.2.1/modules/lua/libs/configuration.c -=================================================================== ---- vlc-2.2.1.orig/modules/lua/libs/configuration.c -+++ vlc-2.2.1/modules/lua/libs/configuration.c -@@ -84,7 +84,7 @@ static int vlclua_config_set( lua_State - break; - - case VLC_VAR_INTEGER: -- config_PutInt( p_this, psz_name, luaL_checkint( L, 2 ) ); -+ config_PutInt( p_this, psz_name, luaL_checkinteger( L, 2 ) ); - break; - - case VLC_VAR_BOOL: -Index: vlc-2.2.1/modules/lua/libs/net.c -=================================================================== ---- vlc-2.2.1.orig/modules/lua/libs/net.c -+++ vlc-2.2.1/modules/lua/libs/net.c -@@ -202,7 +202,7 @@ static int vlclua_net_listen_tcp( lua_St + if (buf != NULL) +--- a/modules/lua/libs/net.c ++++ b/modules/lua/libs/net.c +@@ -179,7 +179,7 @@ static int vlclua_net_listen_tcp( lua_St { vlc_object_t *p_this = vlclua_get_this( L ); const char *psz_host = luaL_checkstring( L, 1 ); @@ -53,16 +36,16 @@ Index: vlc-2.2.1/modules/lua/libs/net.c int *pi_fd = net_ListenTCP( p_this, psz_host, i_port ); if( pi_fd == NULL ) return luaL_error( L, "Cannot listen on %s:%d", psz_host, i_port ); -@@ -274,7 +274,7 @@ static int vlclua_net_connect_tcp( lua_S +@@ -251,7 +251,7 @@ static int vlclua_net_connect_tcp( lua_S { vlc_object_t *p_this = vlclua_get_this( L ); const char *psz_host = luaL_checkstring( L, 1 ); - int i_port = luaL_checkint( L, 2 ); + int i_port = luaL_checkinteger( L, 2 ); - int i_fd = net_Connect( p_this, psz_host, i_port, SOCK_STREAM, IPPROTO_TCP ); + int i_fd = net_ConnectTCP( p_this, psz_host, i_port ); lua_pushinteger( L, vlclua_fd_map_safe( L, i_fd ) ); return 1; -@@ -282,26 +282,26 @@ static int vlclua_net_connect_tcp( lua_S +@@ -259,14 +259,14 @@ static int vlclua_net_connect_tcp( lua_S static int vlclua_net_close( lua_State *L ) { @@ -79,22 +62,25 @@ Index: vlc-2.2.1/modules/lua/libs/net.c size_t i_len; const char *psz_buffer = luaL_checklstring( L, 2, &i_len ); -- i_len = luaL_optint( L, 3, i_len ); -+ i_len = luaL_optinteger( L, 3, i_len ); - lua_pushinteger( L, (fd != -1) ? send( fd, psz_buffer, i_len, 0 ) : -1 ); - return 1; - } +@@ -278,7 +278,7 @@ static int vlclua_net_send( lua_State *L static int vlclua_net_recv( lua_State *L ) { - int fd = vlclua_fd_get( L, luaL_checkint( L, 1 ) ); -- size_t i_len = luaL_optint( L, 2, 1 ); + int fd = vlclua_fd_get( L, luaL_checkinteger( L, 1 ) ); -+ size_t i_len = luaL_optinteger( L, 2, 1 ); + size_t i_len = (size_t)luaL_optinteger( L, 2, 1 ); char psz_buffer[i_len]; - ssize_t i_ret = (fd != -1) ? recv( fd, psz_buffer, i_len, 0 ) : -1; -@@ -382,19 +382,19 @@ static int vlclua_fd_open( lua_State *L +@@ -312,7 +312,7 @@ static int vlclua_net_poll( lua_State *L + lua_pushnil( L ); + for( int i = 0; lua_next( L, 1 ); i++ ) + { +- luafds[i] = luaL_checkint( L, -2 ); ++ luafds[i] = luaL_checkinteger( L, -2 ); + p_fds[i].fd = vlclua_fd_get( L, luafds[i] ); + p_fds[i].events = luaL_checkinteger( L, -1 ); + p_fds[i].events &= POLLIN | POLLOUT | POLLPRI; +@@ -360,7 +360,7 @@ static int vlclua_fd_open( lua_State *L #ifndef _WIN32 static int vlclua_fd_write( lua_State *L ) { @@ -103,47 +89,18 @@ Index: vlc-2.2.1/modules/lua/libs/net.c size_t i_len; const char *psz_buffer = luaL_checklstring( L, 2, &i_len ); -- i_len = luaL_optint( L, 3, i_len ); -+ i_len = luaL_optinteger( L, 3, i_len ); - lua_pushinteger( L, (fd != -1) ? write( fd, psz_buffer, i_len ) : -1 ); - return 1; - } +@@ -371,7 +371,7 @@ static int vlclua_fd_write( lua_State *L static int vlclua_fd_read( lua_State *L ) { - int fd = vlclua_fd_get( L, luaL_checkint( L, 1 ) ); -- size_t i_len = luaL_optint( L, 2, 1 ); + int fd = vlclua_fd_get( L, luaL_checkinteger( L, 1 ) ); -+ size_t i_len = luaL_optinteger( L, 2, 1 ); + size_t i_len = (size_t)luaL_optinteger( L, 2, 1 ); char psz_buffer[i_len]; - ssize_t i_ret = (fd != -1) ? read( fd, psz_buffer, i_len ) : -1; -Index: vlc-2.2.1/modules/lua/libs/osd.c -=================================================================== ---- vlc-2.2.1.orig/modules/lua/libs/osd.c -+++ vlc-2.2.1/modules/lua/libs/osd.c -@@ -67,7 +67,7 @@ static int vlclua_osd_icon( lua_State *L - { - const char *psz_icon = luaL_checkstring( L, 1 ); - int i_icon = vlc_osd_icon_from_string( psz_icon ); -- int i_chan = luaL_optint( L, 2, SPU_DEFAULT_CHANNEL ); -+ int i_chan = luaL_optinteger( L, 2, SPU_DEFAULT_CHANNEL ); - if( !i_icon ) - return luaL_error( L, "\"%s\" is not a valid osd icon.", psz_icon ); - -@@ -114,9 +114,9 @@ static int vlc_osd_position_from_string( - static int vlclua_osd_message( lua_State *L ) - { - const char *psz_message = luaL_checkstring( L, 1 ); -- int i_chan = luaL_optint( L, 2, SPU_DEFAULT_CHANNEL ); -+ int i_chan = luaL_optinteger( L, 2, SPU_DEFAULT_CHANNEL ); - const char *psz_position = luaL_optstring( L, 3, "top-right" ); -- mtime_t duration = luaL_optint( L, 4, 1000000 ); -+ mtime_t duration = luaL_optinteger( L, 4, 1000000 ); - - input_thread_t *p_input = vlclua_get_input_internal( L ); - if( p_input ) -@@ -154,10 +154,10 @@ static int vlc_osd_slider_type_from_stri +--- a/modules/lua/libs/osd.c ++++ b/modules/lua/libs/osd.c +@@ -154,7 +154,7 @@ static int vlc_osd_slider_type_from_stri static int vlclua_osd_slider( lua_State *L ) { @@ -151,11 +108,7 @@ Index: vlc-2.2.1/modules/lua/libs/osd.c + int i_position = luaL_checkinteger( L, 1 ); const char *psz_type = luaL_checkstring( L, 2 ); int i_type = vlc_osd_slider_type_from_string( psz_type ); -- int i_chan = luaL_optint( L, 3, SPU_DEFAULT_CHANNEL ); -+ int i_chan = luaL_optinteger( L, 3, SPU_DEFAULT_CHANNEL ); - if( !i_type ) - return luaL_error( L, "\"%s\" is not a valid slider type.", - psz_type ); + int i_chan = (int)luaL_optinteger( L, 3, VOUT_SPU_CHANNEL_OSD ); @@ -198,7 +198,7 @@ static int vlclua_spu_channel_register( static int vlclua_spu_channel_clear( lua_State *L ) @@ -165,10 +118,8 @@ Index: vlc-2.2.1/modules/lua/libs/osd.c input_thread_t *p_input = vlclua_get_input_internal( L ); if( !p_input ) return luaL_error( L, "Unable to find input." ); -Index: vlc-2.2.1/modules/lua/libs/playlist.c -=================================================================== ---- vlc-2.2.1.orig/modules/lua/libs/playlist.c -+++ vlc-2.2.1/modules/lua/libs/playlist.c +--- a/modules/lua/libs/playlist.c ++++ b/modules/lua/libs/playlist.c @@ -69,7 +69,7 @@ static int vlclua_playlist_next( lua_Sta static int vlclua_playlist_skip( lua_State * L ) @@ -186,17 +137,17 @@ Index: vlc-2.2.1/modules/lua/libs/playlist.c + int i_id = luaL_checkinteger( L, 1 ); playlist_t *p_playlist = vlclua_get_playlist_internal( L ); PL_LOCK; - int i_ret = playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, -@@ -139,7 +139,7 @@ static int vlclua_playlist_gotoitem( lua + playlist_ViewPlay( p_playlist, NULL, +@@ -138,7 +138,7 @@ static int vlclua_playlist_gotoitem( lua static int vlclua_playlist_delete( lua_State * L ) { - int i_id = luaL_checkint( L, 1 ); + int i_id = luaL_checkinteger( L, 1 ); playlist_t *p_playlist = vlclua_get_playlist_internal( L ); + PL_LOCK; - playlist_item_t *p_item = playlist_ItemGetById( p_playlist, i_id ); -@@ -155,8 +155,8 @@ static int vlclua_playlist_delete( lua_S +@@ -152,8 +152,8 @@ static int vlclua_playlist_delete( lua_S static int vlclua_playlist_move( lua_State * L ) { @@ -207,11 +158,9 @@ Index: vlc-2.2.1/modules/lua/libs/playlist.c playlist_t *p_playlist = vlclua_get_playlist_internal( L ); PL_LOCK; playlist_item_t *p_item = playlist_ItemGetById( p_playlist, i_item ); -Index: vlc-2.2.1/modules/lua/libs/stream.c -=================================================================== ---- vlc-2.2.1.orig/modules/lua/libs/stream.c -+++ vlc-2.2.1/modules/lua/libs/stream.c -@@ -101,7 +101,7 @@ static int vlclua_stream_read( lua_State +--- a/modules/lua/libs/stream.c ++++ b/modules/lua/libs/stream.c +@@ -123,7 +123,7 @@ static int vlclua_stream_read( lua_State { int i_read; stream_t **pp_stream = (stream_t **)luaL_checkudata( L, 1, "stream" ); @@ -220,23 +169,8 @@ Index: vlc-2.2.1/modules/lua/libs/stream.c uint8_t *p_read = malloc( n ); if( !p_read ) return vlclua_error( L ); -Index: vlc-2.2.1/modules/lua/libs/variables.c -=================================================================== ---- vlc-2.2.1.orig/modules/lua/libs/variables.c -+++ vlc-2.2.1/modules/lua/libs/variables.c -@@ -103,7 +103,7 @@ static int vlclua_tovalue( lua_State *L, - val->b_bool = luaL_checkboolean( L, -1 ); - break; - case VLC_VAR_INTEGER: -- val->i_int = luaL_checkint( L, -1 ); -+ val->i_int = luaL_checkinteger( L, -1 ); - break; - case VLC_VAR_STRING: - val->psz_string = (char*)luaL_checkstring( L, -1 ); /* XXX: Beware, this only stays valid as long as (L,-1) stays in the stack */ -Index: vlc-2.2.1/modules/lua/libs/volume.c -=================================================================== ---- vlc-2.2.1.orig/modules/lua/libs/volume.c -+++ vlc-2.2.1/modules/lua/libs/volume.c +--- a/modules/lua/libs/volume.c ++++ b/modules/lua/libs/volume.c @@ -48,7 +48,7 @@ static int vlclua_volume_set( lua_State *L ) { @@ -246,34 +180,54 @@ Index: vlc-2.2.1/modules/lua/libs/volume.c if( i_volume < 0 ) i_volume = 0; int i_ret = playlist_VolumeSet( p_this, i_volume/(float)AOUT_VOLUME_DEFAULT ); -@@ -68,7 +68,7 @@ static int vlclua_volume_up( lua_State * - playlist_t *p_this = vlclua_get_playlist_internal( L ); - float volume; - -- playlist_VolumeUp( p_this, luaL_optint( L, 1, 1 ), &volume ); -+ playlist_VolumeUp( p_this, luaL_optinteger( L, 1, 1 ), &volume ); - lua_pushnumber( L, lroundf(volume * AOUT_VOLUME_DEFAULT) ); - return 1; - } -@@ -78,7 +78,7 @@ static int vlclua_volume_down( lua_State - playlist_t *p_this = vlclua_get_playlist_internal( L ); - float volume; - -- playlist_VolumeDown( p_this, luaL_optint( L, 1, 1 ), &volume ); -+ playlist_VolumeDown( p_this, luaL_optinteger( L, 1, 1 ), &volume ); - lua_pushnumber( L, lroundf(volume * AOUT_VOLUME_DEFAULT) ); - return 1; +--- a/modules/lua/libs/dialog.c ++++ b/modules/lua/libs/dialog.c +@@ -382,7 +382,7 @@ static int lua_GetDialogUpdate( lua_Stat + /* Read entry in the Lua registry */ + lua_pushlightuserdata( L, (void*) &key_update ); + lua_gettable( L, LUA_REGISTRYINDEX ); +- return luaL_checkint( L, -1 ); ++ return luaL_checkinteger( L, -1 ); } -Index: vlc-2.2.1/modules/lua/libs/win.c -=================================================================== ---- vlc-2.2.1.orig/modules/lua/libs/win.c -+++ vlc-2.2.1/modules/lua/libs/win.c -@@ -123,7 +123,7 @@ static int vlclua_console_init( lua_Stat - static int vlclua_console_wait( lua_State *L ) - { -- int i_timeout = luaL_optint( L, 1, 0 ); -+ int i_timeout = luaL_optinteger( L, 1, 0 ); - DWORD status = WaitForSingleObject( GetConsole( L ), i_timeout ); - lua_pushboolean( L, status == WAIT_OBJECT_0 ); - return 1; + /** Manually update a dialog +@@ -573,22 +573,22 @@ static int vlclua_create_widget_inner( l + + /* Set common arguments: col, row, hspan, vspan, width, height */ + if( lua_isnumber( L, arg ) ) +- p_widget->i_column = luaL_checkint( L, arg ); ++ p_widget->i_column = luaL_checkinteger( L, arg ); + else goto end_of_args; + if( lua_isnumber( L, ++arg ) ) +- p_widget->i_row = luaL_checkint( L, arg ); ++ p_widget->i_row = luaL_checkinteger( L, arg ); + else goto end_of_args; + if( lua_isnumber( L, ++arg ) ) +- p_widget->i_horiz_span = luaL_checkint( L, arg ); ++ p_widget->i_horiz_span = luaL_checkinteger( L, arg ); + else goto end_of_args; + if( lua_isnumber( L, ++arg ) ) +- p_widget->i_vert_span = luaL_checkint( L, arg ); ++ p_widget->i_vert_span = luaL_checkinteger( L, arg ); + else goto end_of_args; + if( lua_isnumber( L, ++arg ) ) +- p_widget->i_width = luaL_checkint( L, arg ); ++ p_widget->i_width = luaL_checkinteger( L, arg ); + else goto end_of_args; + if( lua_isnumber( L, ++arg ) ) +- p_widget->i_height = luaL_checkint( L, arg ); ++ p_widget->i_height = luaL_checkinteger( L, arg ); + else goto end_of_args; + + end_of_args: +--- a/modules/lua/libs/io.c ++++ b/modules/lua/libs/io.c +@@ -139,7 +139,7 @@ static int vlclua_io_file_seek( lua_Stat + const char* psz_mode = luaL_optstring( L, 2, NULL ); + if ( psz_mode != NULL ) + { +- long i_offset = luaL_optlong( L, 3, 0 ); ++ long i_offset = (long)luaL_optinteger( L, 3, 0 ); + int i_mode; + if ( !strcmp( psz_mode, "set" ) ) + i_mode = SEEK_SET; |