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
0df4f0cd
Commit
0df4f0cd
authored
Aug 16, 2007
by
Damien Fouilleul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lua: fixed search paths list for scripts, needs more work for Linux
parent
2dffeb14
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
17 deletions
+18
-17
modules/demux/playlist/luaplaylist.c
modules/demux/playlist/luaplaylist.c
+9
-9
modules/meta_engine/luameta.c
modules/meta_engine/luameta.c
+9
-8
No files found.
modules/demux/playlist/luaplaylist.c
View file @
0df4f0cd
...
...
@@ -252,7 +252,7 @@ int E_(Import_LuaPlaylist)( vlc_object_t *p_this )
char
**
ppsz_fileend
=
NULL
;
char
**
ppsz_file
;
char
*
ppsz_dir_list
[]
=
{
NULL
,
NULL
,
NULL
};
char
*
ppsz_dir_list
[]
=
{
NULL
,
NULL
,
NULL
,
NULL
};
char
**
ppsz_dir
;
p_demux
->
p_sys
=
(
demux_sys_t
*
)
malloc
(
sizeof
(
demux_sys_t
)
);
...
...
@@ -289,17 +289,17 @@ int E_(Import_LuaPlaylist)( vlc_object_t *p_this )
lua_pop
(
p_state
,
1
);
ppsz_dir_list
[
0
]
=
malloc
(
strlen
(
p_demux
->
p_libvlc
->
psz_homedir
)
+
strlen
(
DIR_SEP
CONFIG_DIR
DIR_SEP
"luaplaylist"
)
+
1
);
sprintf
(
ppsz_dir_list
[
0
],
"%s"
DIR_SEP
CONFIG_DIR
DIR_SEP
"luaplaylist"
,
p_demux
->
p_libvlc
->
psz_homedir
);
if
(
asprintf
(
&
ppsz_dir_list
[
0
],
"%s"
DIR_SEP
CONFIG_DIR
DIR_SEP
"luaplaylist"
,
p_demux
->
p_libvlc
->
psz_homedir
)
<
-
1
)
return
VLC_ENOMEM
;
# if defined(__APPLE__) || defined(SYS_BEOS) || defined(WIN32)
{
char
*
psz_vlcpath
=
config_GetDataDir
(
p_demux
);
ppsz_dir_list
[
1
]
=
malloc
(
strlen
(
psz_vlcpath
)
+
strlen
(
"luaplaylist"
)
+
1
);
if
(
!
ppsz_dir_list
[
1
]
)
return
VLC_ENOMEM
;
sprintf
(
ppsz_dir_list
[
1
],
"%s"
DIR_SEP
"luaplaylist"
,
psz_vlcpath
);
if
(
asprintf
(
&
ppsz_dir_list
[
1
],
"%s"
DIR_SEP
"luaplaylist"
,
psz_vlcpath
)
<
0
)
return
VLC_ENOMEM
;
if
(
asprintf
(
&
ppsz_dir_list
[
2
],
"%s"
DIR_SEP
"share"
DIR_SEP
"luaplaylist"
,
psz_vlcpath
)
<
0
)
return
VLC_ENOMEM
;
}
# else
{
...
...
@@ -347,7 +347,7 @@ int E_(Import_LuaPlaylist)( vlc_object_t *p_this )
for
(
ppsz_file
=
ppsz_filelist
;
ppsz_file
<
ppsz_fileend
;
ppsz_file
++
)
{
free
(
psz_filename
);
psz_filename
=
NULL
;
asprintf
(
&
psz_filename
,
"%s
/
%s"
,
*
ppsz_dir
,
*
ppsz_file
);
asprintf
(
&
psz_filename
,
"%s
"
DIR_SEP
"
%s"
,
*
ppsz_dir
,
*
ppsz_file
);
msg_Dbg
(
p_demux
,
"Trying Lua playlist script %s"
,
psz_filename
);
p_demux
->
p_sys
->
psz_filename
=
psz_filename
;
...
...
modules/meta_engine/luameta.c
View file @
0df4f0cd
...
...
@@ -292,20 +292,21 @@ static int vlclua_scripts_batch_execute( vlc_object_t *p_this,
char
**
ppsz_fileend
=
NULL
;
char
**
ppsz_file
;
char
*
ppsz_dir_list
[]
=
{
NULL
,
NULL
,
NULL
};
char
*
ppsz_dir_list
[]
=
{
NULL
,
NULL
,
NULL
,
NULL
};
char
**
ppsz_dir
;
ppsz_dir_list
[
0
]
=
malloc
(
strlen
(
p_this
->
p_libvlc
->
psz_homedir
)
+
strlen
(
DIR_SEP
CONFIG_DIR
DIR_SEP
)
+
strlen
(
luadirname
)
+
1
);
sprintf
(
ppsz_dir_list
[
0
],
"%s"
DIR_SEP
CONFIG_DIR
DIR_SEP
"%s"
,
p_this
->
p_libvlc
->
psz_homedir
,
luadirname
);
if
(
asprintf
(
&
ppsz_dir_list
[
0
],
"%s"
DIR_SEP
CONFIG_DIR
DIR_SEP
"%s"
,
p_this
->
p_libvlc
->
psz_homedir
,
luadirname
)
<
0
)
return
VLC_ENOMEM
;
# if defined(__APPLE__) || defined(SYS_BEOS) || defined(WIN32)
{
const
char
*
psz_vlcpath
=
config_GetDataDir
(
p_this
);
ppsz_dir_list
[
1
]
=
malloc
(
strlen
(
psz_vlcpath
)
+
strlen
(
luadirname
)
+
1
);
if
(
!
ppsz_dir_list
[
1
]
)
return
VLC_ENOMEM
;
sprintf
(
ppsz_dir_list
[
1
],
"%s"
DIR_SEP
"%s"
,
psz_vlcpath
,
luadirname
);
if
(
asprintf
(
&
ppsz_dir_list
[
1
],
"%s"
DIR_SEP
"%s"
,
psz_vlcpath
,
luadirname
)
<
0
)
return
VLC_ENOMEM
;
if
(
asprintf
(
&
ppsz_dir_list
[
2
],
"%s"
DIR_SEP
"share"
DIR_SEP
"%s"
,
psz_vlcpath
,
luadirname
)
<
0
)
return
VLC_ENOMEM
;
}
# endif
...
...
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