return 1;
}
+static int vlclua_input_add_subtitle( lua_State *L )
+{
+ input_thread_t *p_input = vlclua_get_input_internal( L );
+ if( !p_input )
+ return luaL_error( L, "can't add subtitle: no current input" );
+ if( !lua_isstring( L, 1 ) )
+ return luaL_error( L, "vlc.input.add_subtitle() usage: (url)" );
+ const char *psz_url = luaL_checkstring( L, 1 );
+ input_AddSubtitle( p_input, psz_url, false );
+ vlc_object_release( p_input );
+ return 1;
+}
+
/*****************************************************************************
*
*****************************************************************************/
{ "is_playing", vlclua_is_playing },
{ "get_title", vlclua_get_title },
{ "stats", vlclua_input_stats },
+ { "add_subtitle", vlclua_input_add_subtitle },
{ NULL, NULL }
};