Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
bdba9b68
Commit
bdba9b68
authored
Dec 04, 2011
by
Pierre Ynard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lua: fix lua{intf=<intf>} syntax
parent
2cff61a8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
14 deletions
+18
-14
modules/lua/intf.c
modules/lua/intf.c
+18
-14
No files found.
modules/lua/intf.c
View file @
bdba9b68
...
...
@@ -36,7 +36,6 @@
#include <vlc_interface.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <assert.h>
#include <lua.h>
/* Low level lua C API */
#include <lauxlib.h>
/* Higher level C API */
...
...
@@ -123,15 +122,29 @@ static int Start_LuaIntf( vlc_object_t *p_this, const char *name )
intf_sys_t
*
p_sys
;
lua_State
*
L
;
assert
(
name
!=
NULL
);
config_ChainParse
(
p_intf
,
"lua-"
,
ppsz_intf_options
,
p_intf
->
p_cfg
);
char
*
psz_config
;
bool
b_config_set
=
false
;
if
(
name
==
NULL
)
{
char
*
n
=
var_InheritString
(
p_this
,
"lua-intf"
);
if
(
unlikely
(
n
==
NULL
)
)
return
VLC_EGENERIC
;
name
=
p_intf
->
psz_header
=
n
;
}
else
/* Cleaned up by vlc_object_release() */
p_intf
->
psz_header
=
strdup
(
name
);
p_intf
->
p_sys
=
(
intf_sys_t
*
)
malloc
(
sizeof
(
intf_sys_t
)
);
if
(
!
p_intf
->
p_sys
)
{
free
(
p_intf
->
psz_header
);
p_intf
->
psz_header
=
NULL
;
return
VLC_ENOMEM
;
}
p_sys
=
p_intf
->
p_sys
;
p_sys
->
psz_filename
=
vlclua_find_file
(
p_this
,
"intf"
,
name
);
if
(
!
p_sys
->
psz_filename
)
...
...
@@ -350,17 +363,12 @@ static int Start_LuaIntf( vlc_object_t *p_this, const char *name )
p_sys
->
L
=
L
;
/* Cleaned up by vlc_object_release() */
p_intf
->
psz_header
=
strdup
(
name
);
vlc_mutex_init
(
&
p_sys
->
lock
);
vlc_cond_init
(
&
p_sys
->
wait
);
p_sys
->
exiting
=
false
;
if
(
vlc_clone
(
&
p_sys
->
thread
,
Run
,
p_intf
,
VLC_THREAD_PRIORITY_LOW
)
)
{
free
(
p_intf
->
psz_header
);
p_intf
->
psz_header
=
NULL
;
vlc_cond_destroy
(
&
p_sys
->
wait
);
vlc_mutex_destroy
(
&
p_sys
->
lock
);
lua_close
(
p_sys
->
L
);
...
...
@@ -371,6 +379,8 @@ static int Start_LuaIntf( vlc_object_t *p_this, const char *name )
error:
free
(
p_sys
->
psz_filename
);
free
(
p_sys
);
free
(
p_intf
->
psz_header
);
p_intf
->
psz_header
=
NULL
;
return
VLC_EGENERIC
;
}
...
...
@@ -412,13 +422,7 @@ static void *Run( void *data )
int
Open_LuaIntf
(
vlc_object_t
*
p_this
)
{
char
*
name
=
var_InheritString
(
p_this
,
"lua-intf"
);
if
(
unlikely
(
name
==
NULL
)
)
return
VLC_EGENERIC
;
int
ret
=
Start_LuaIntf
(
p_this
,
name
);
free
(
name
);
return
ret
;
return
Start_LuaIntf
(
p_this
,
NULL
);
}
int
Open_LuaHTTP
(
vlc_object_t
*
p_this
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment