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
f0d13543
Commit
f0d13543
authored
Oct 18, 2010
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lua_sd: cleanup.
parent
ca609be9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
15 deletions
+17
-15
modules/misc/lua/services_discovery.c
modules/misc/lua/services_discovery.c
+17
-15
No files found.
modules/misc/lua/services_discovery.c
View file @
f0d13543
...
...
@@ -42,6 +42,7 @@ static const char * const ppsz_sd_options[] = { "sd", "longname", NULL };
/*****************************************************************************
* Local structures
*****************************************************************************/
struct
services_discovery_sys_t
{
lua_State
*
L
;
...
...
@@ -67,7 +68,7 @@ int Open_LuaSD( vlc_object_t *p_this )
lua_State
*
L
=
NULL
;
char
*
psz_name
;
if
(
!
strcmp
(
p_sd
->
psz_name
,
"lua"
)
)
if
(
!
strcmp
(
p_sd
->
psz_name
,
"lua"
)
)
{
// We want to load the module name "lua"
// This module can be used to load lua script not registered
...
...
@@ -139,7 +140,7 @@ int Open_LuaSD( vlc_object_t *p_this )
p_sys
->
b_exiting
=
false
;
TAB_INIT
(
p_sys
->
i_query
,
p_sys
->
ppsz_query
);
if
(
vlc_clone
(
&
p_sd
->
p_sys
->
thread
,
Run
,
p_sd
,
VLC_THREAD_PRIORITY_LOW
)
)
if
(
vlc_clone
(
&
p_sys
->
thread
,
Run
,
p_sd
,
VLC_THREAD_PRIORITY_LOW
)
)
{
TAB_CLEAN
(
p_sys
->
i_query
,
p_sys
->
ppsz_query
);
vlc_cond_destroy
(
&
p_sys
->
cond
);
...
...
@@ -162,23 +163,24 @@ error:
void
Close_LuaSD
(
vlc_object_t
*
p_this
)
{
services_discovery_t
*
p_sd
=
(
services_discovery_t
*
)
p_this
;
services_discovery_sys_t
*
p_sys
=
p_sd
->
p_sys
;
vlc_mutex_lock
(
&
p_s
d
->
p_s
ys
->
lock
);
p_s
d
->
p_s
ys
->
b_exiting
=
true
;
vlc_mutex_unlock
(
&
p_s
d
->
p_s
ys
->
lock
);
vlc_mutex_lock
(
&
p_sys
->
lock
);
p_sys
->
b_exiting
=
true
;
vlc_mutex_unlock
(
&
p_sys
->
lock
);
vlc_cancel
(
p_s
d
->
p_s
ys
->
thread
);
vlc_join
(
p_sd
->
p_sys
->
thread
,
NULL
);
vlc_cancel
(
p_sys
->
thread
);
vlc_join
(
p_sys
->
thread
,
NULL
);
for
(
int
i
=
0
;
i
<
p_s
d
->
p_s
ys
->
i_query
;
i
++
)
free
(
p_s
d
->
p_s
ys
->
ppsz_query
[
i
]
);
TAB_CLEAN
(
p_s
d
->
p_sys
->
i_query
,
p_sd
->
p_sys
->
ppsz_query
);
for
(
int
i
=
0
;
i
<
p_sys
->
i_query
;
i
++
)
free
(
p_sys
->
ppsz_query
[
i
]
);
TAB_CLEAN
(
p_s
ys
->
i_query
,
p_sys
->
ppsz_query
);
vlc_cond_destroy
(
&
p_s
d
->
p_s
ys
->
cond
);
vlc_mutex_destroy
(
&
p_s
d
->
p_s
ys
->
lock
);
free
(
p_s
d
->
p_s
ys
->
psz_filename
);
lua_close
(
p_s
d
->
p_s
ys
->
L
);
free
(
p_s
d
->
p_s
ys
);
vlc_cond_destroy
(
&
p_sys
->
cond
);
vlc_mutex_destroy
(
&
p_sys
->
lock
);
free
(
p_sys
->
psz_filename
);
lua_close
(
p_sys
->
L
);
free
(
p_sys
);
}
/*****************************************************************************
...
...
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