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
1c8cd6b7
Commit
1c8cd6b7
authored
May 19, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Match used SD alias rather than plugin name (fixes #2756)
parent
f2955030
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
16 deletions
+21
-16
src/playlist/services_discovery.c
src/playlist/services_discovery.c
+21
-16
No files found.
src/playlist/services_discovery.c
View file @
1c8cd6b7
...
...
@@ -299,18 +299,18 @@ int playlist_ServicesDiscoveryAdd( playlist_t *p_playlist, const char *psz_modul
}
int
playlist_ServicesDiscoveryRemove
(
playlist_t
*
p_playlist
,
const
char
*
psz_
modul
e
)
const
char
*
psz_
nam
e
)
{
playlist_private_t
*
priv
=
pl_priv
(
p_playlist
);
struct
playlist_services_discovery_support_t
*
p_sds
=
NULL
;
int
i
;
PL_LOCK
;
for
(
i
=
0
;
i
<
pl_priv
(
p_playlist
)
->
i_sds
;
i
++
)
for
(
i
nt
i
=
0
;
i
<
priv
->
i_sds
;
i
++
)
{
if
(
!
strcmp
(
psz_
module
,
module_get_object
(
pl_priv
(
p_playlist
)
->
pp_sds
[
i
]
->
p_sd
->
p_module
)
)
)
if
(
!
strcmp
(
psz_
name
,
priv
->
pp_sds
[
i
]
->
psz_name
)
)
{
p_sds
=
p
l_priv
(
p_playlist
)
->
pp_sds
[
i
];
REMOVE_ELEM
(
p
l_priv
(
p_playlist
)
->
pp_sds
,
pl_priv
(
p_playlist
)
->
i_sds
,
i
);
p_sds
=
p
riv
->
pp_sds
[
i
];
REMOVE_ELEM
(
p
riv
->
pp_sds
,
priv
->
i_sds
,
i
);
break
;
}
}
...
...
@@ -318,7 +318,7 @@ int playlist_ServicesDiscoveryRemove( playlist_t * p_playlist,
if
(
!
p_sds
)
{
msg_Warn
(
p_playlist
,
"
module %s is not loaded"
,
psz_modul
e
);
msg_Warn
(
p_playlist
,
"
discovery %s is not loaded"
,
psz_nam
e
);
return
VLC_EGENERIC
;
}
...
...
@@ -365,26 +365,31 @@ int playlist_ServicesDiscoveryRemove( playlist_t * p_playlist,
}
bool
playlist_IsServicesDiscoveryLoaded
(
playlist_t
*
p_playlist
,
const
char
*
psz_modul
e
)
const
char
*
psz_nam
e
)
{
int
i
;
playlist_private_t
*
priv
=
pl_priv
(
p_playlist
);
bool
found
=
false
;
PL_LOCK
;
for
(
i
=
0
;
i
<
pl_priv
(
p_playlist
)
->
i_sds
;
i
++
)
for
(
i
nt
i
=
0
;
i
<
priv
->
i_sds
;
i
++
)
{
if
(
!
strcmp
(
psz_module
,
module_get_object
(
pl_priv
(
p_playlist
)
->
pp_sds
[
i
]
->
p_sd
->
p_module
)
)
)
vlc_sd_internal_t
*
sd
=
priv
->
pp_sds
[
i
];
if
(
sd
->
psz_name
&&
!
strcmp
(
psz_name
,
sd
->
psz_name
)
)
{
PL_UNLOCK
;
return
true
;
found
=
true
;
break
;
}
}
PL_UNLOCK
;
return
f
alse
;
return
f
ound
;
}
void
playlist_ServicesDiscoveryKillAll
(
playlist_t
*
p_playlist
)
{
while
(
pl_priv
(
p_playlist
)
->
i_sds
>
0
)
playlist_private_t
*
priv
=
pl_priv
(
p_playlist
);
while
(
priv
->
i_sds
>
0
)
playlist_ServicesDiscoveryRemove
(
p_playlist
,
module_get_object
(
pl_priv
(
p_playlist
)
->
pp_sds
[
0
]
->
p_sd
->
p_module
)
);
priv
->
pp_sds
[
0
]
->
psz_name
);
}
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