Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
13
Issues
13
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
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
GSoC
GSoC2018
macOS
vlc
Commits
71ec2c47
Commit
71ec2c47
authored
Nov 16, 2016
by
Pierre Ynard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
luasd: de-duplicate script names before probing
Fix #3353
parent
6290ebf6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
9 deletions
+24
-9
modules/lua/vlc.c
modules/lua/vlc.c
+24
-9
No files found.
modules/lua/vlc.c
View file @
71ec2c47
...
...
@@ -37,6 +37,7 @@
#include "vlc.h"
#include <vlc_plugin.h>
#include <vlc_arrays.h>
#include <vlc_charset.h>
#include <vlc_fs.h>
#include <vlc_services_discovery.h>
...
...
@@ -619,7 +620,9 @@ int vlclua_playlist_add_internal( vlc_object_t *p_this, lua_State *L,
static
int
vlc_sd_probe_Open
(
vlc_object_t
*
obj
)
{
int
r
=
VLC_PROBE_CONTINUE
;
vlc_dictionary_t
name_d
;
vlc_dictionary_init
(
&
name_d
,
32
);
char
**
ppsz_dir_list
;
vlclua_dir_list
(
"sd"
,
&
ppsz_dir_list
);
for
(
char
**
ppsz_dir
=
ppsz_dir_list
;
*
ppsz_dir
;
ppsz_dir
++
)
...
...
@@ -635,18 +638,30 @@ static int vlc_sd_probe_Open( vlc_object_t *obj )
char
*
temp
=
strchr
(
*
ppsz_file
,
'.'
);
if
(
temp
)
*
temp
=
'\0'
;
r
=
vlclua_probe_sd
(
obj
,
*
ppsz_file
);
if
(
r
!=
VLC_PROBE_CONTINUE
)
break
;
}
for
(
char
**
ppsz_file
=
ppsz_filelist
;
ppsz_file
<
ppsz_filelist
+
i_files
;
ppsz_file
++
)
if
(
vlc_dictionary_value_for_key
(
&
name_d
,
*
ppsz_file
)
==
kVLCDictionaryNotFound
)
vlc_dictionary_insert
(
&
name_d
,
*
ppsz_file
,
&
name_d
);
free
(
*
ppsz_file
);
}
free
(
ppsz_filelist
);
if
(
r
!=
VLC_PROBE_CONTINUE
)
break
;
}
vlclua_dir_list_free
(
ppsz_dir_list
);
int
r
=
VLC_PROBE_CONTINUE
;
char
**
names
=
vlc_dictionary_all_keys
(
&
name_d
);
if
(
names
!=
NULL
)
{
for
(
char
**
name
=
names
;
*
name
!=
NULL
;
name
++
)
{
r
=
vlclua_probe_sd
(
obj
,
*
name
);
if
(
r
!=
VLC_PROBE_CONTINUE
)
break
;
}
free
(
names
);
}
vlc_dictionary_clear
(
&
name_d
,
NULL
,
NULL
);
return
r
;
}
...
...
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