Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
588723d7
Commit
588723d7
authored
Aug 01, 2008
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add vlclua_dir_list_free to free list created by vlclua_dir_list and use it.
parent
07be8bb5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
modules/misc/lua/vlc.c
modules/misc/lua/vlc.c
+11
-2
modules/misc/lua/vlc.h
modules/misc/lua/vlc.h
+1
-0
No files found.
modules/misc/lua/vlc.c
View file @
588723d7
...
...
@@ -143,6 +143,13 @@ int vlclua_dir_list( const char *luadirname, char **ppsz_dir_list )
return
VLC_SUCCESS
;
}
void
vlclua_dir_list_free
(
char
**
ppsz_dir_list
)
{
char
**
ppsz_dir
;
for
(
ppsz_dir
=
ppsz_dir_list
;
*
ppsz_dir
;
ppsz_dir
++
)
free
(
*
ppsz_dir
);
}
/*****************************************************************************
* Will execute func on all scripts in luadirname, and stop if func returns
* success.
...
...
@@ -192,7 +199,10 @@ int vlclua_scripts_batch_execute( vlc_object_t *p_this,
char
*
psz_filename
;
if
(
asprintf
(
&
psz_filename
,
"%s"
DIR_SEP
"%s"
,
*
ppsz_dir
,
*
ppsz_file
)
<
0
)
{
vlclua_dir_list_free
(
ppsz_dir_list
);
return
VLC_ENOMEM
;
}
msg_Dbg
(
p_this
,
"Trying Lua playlist script %s"
,
psz_filename
);
i_ret
=
func
(
p_this
,
psz_filename
,
L
,
user_data
);
...
...
@@ -211,8 +221,7 @@ int vlclua_scripts_batch_execute( vlc_object_t *p_this,
free
(
*
ppsz_file
);
free
(
ppsz_filelist
);
}
for
(
ppsz_dir
=
ppsz_dir_list
;
*
ppsz_dir
;
ppsz_dir
++
)
free
(
*
ppsz_dir
);
vlclua_dir_list_free
(
ppsz_dir_list
);
return
i_ret
;
}
...
...
modules/misc/lua/vlc.h
View file @
588723d7
...
...
@@ -106,6 +106,7 @@ int vlclua_scripts_batch_execute( vlc_object_t *p_this, const char * luadirname,
int
(
*
func
)(
vlc_object_t
*
,
const
char
*
,
lua_State
*
,
void
*
),
lua_State
*
L
,
void
*
user_data
);
int
vlclua_dir_list
(
const
char
*
luadirname
,
char
**
ppsz_dir_list
);
void
vlclua_dir_list_free
(
char
**
ppsz_dir_list
);
/*****************************************************************************
* Playlist and meta data internal utilities.
...
...
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