Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
f60a8c72
Commit
f60a8c72
authored
Jul 15, 2008
by
Pierre d'Herbemont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
services_discovery: Don't forget a PL_LOCK.
Spotted by
3af47f42
and ivoire.
parent
9399329f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
src/playlist/services_discovery.c
src/playlist/services_discovery.c
+8
-5
No files found.
src/playlist/services_discovery.c
View file @
f60a8c72
...
@@ -214,34 +214,37 @@ static void playlist_sd_item_added( const vlc_event_t * p_event, void * user_dat
...
@@ -214,34 +214,37 @@ static void playlist_sd_item_added( const vlc_event_t * p_event, void * user_dat
input_item_t
*
p_input
=
p_event
->
u
.
services_discovery_item_added
.
p_new_item
;
input_item_t
*
p_input
=
p_event
->
u
.
services_discovery_item_added
.
p_new_item
;
const
char
*
psz_cat
=
p_event
->
u
.
services_discovery_item_added
.
psz_category
;
const
char
*
psz_cat
=
p_event
->
u
.
services_discovery_item_added
.
psz_category
;
playlist_item_t
*
p_new_item
,
*
p_parent
=
user_data
;
playlist_item_t
*
p_new_item
,
*
p_parent
=
user_data
;
playlist_t
*
p_playlist
=
p_parent
->
p_playlist
;
msg_Dbg
(
p_p
arent
->
p_p
laylist
,
"Adding %s in %s"
,
msg_Dbg
(
p_playlist
,
"Adding %s in %s"
,
p_input
->
psz_name
?
p_input
->
psz_name
:
"(null)"
,
p_input
->
psz_name
?
p_input
->
psz_name
:
"(null)"
,
psz_cat
?
psz_cat
:
"(null)"
);
psz_cat
?
psz_cat
:
"(null)"
);
PL_LOCK
;
/* If p_parent is in root category (this is clearly a hack) and we have a cat */
/* If p_parent is in root category (this is clearly a hack) and we have a cat */
if
(
!
EMPTY_STR
(
psz_cat
)
&&
if
(
!
EMPTY_STR
(
psz_cat
)
&&
p_parent
->
p_parent
==
p_p
arent
->
p_p
laylist
->
p_root_category
)
p_parent
->
p_parent
==
p_playlist
->
p_root_category
)
{
{
/* */
/* */
playlist_item_t
*
p_cat
;
playlist_item_t
*
p_cat
;
p_cat
=
playlist_ChildSearchName
(
p_parent
,
psz_cat
);
p_cat
=
playlist_ChildSearchName
(
p_parent
,
psz_cat
);
if
(
!
p_cat
)
if
(
!
p_cat
)
{
{
p_cat
=
playlist_NodeCreate
(
p_p
arent
->
p_p
laylist
,
psz_cat
,
p_cat
=
playlist_NodeCreate
(
p_playlist
,
psz_cat
,
p_parent
,
0
,
NULL
);
p_parent
,
0
,
NULL
);
p_cat
->
i_flags
&=
~
PLAYLIST_SKIP_FLAG
;
p_cat
->
i_flags
&=
~
PLAYLIST_SKIP_FLAG
;
}
}
p_parent
=
p_cat
;
p_parent
=
p_cat
;
}
}
p_new_item
=
playlist_NodeAddInput
(
p_p
arent
->
p_p
laylist
,
p_input
,
p_parent
,
p_new_item
=
playlist_NodeAddInput
(
p_playlist
,
p_input
,
p_parent
,
PLAYLIST_APPEND
,
PLAYLIST_END
,
false
);
PLAYLIST_APPEND
,
PLAYLIST_END
,
pl_Locked
);
if
(
p_new_item
)
if
(
p_new_item
)
{
{
p_new_item
->
i_flags
&=
~
PLAYLIST_SKIP_FLAG
;
p_new_item
->
i_flags
&=
~
PLAYLIST_SKIP_FLAG
;
p_new_item
->
i_flags
&=
~
PLAYLIST_SAVE_FLAG
;
p_new_item
->
i_flags
&=
~
PLAYLIST_SAVE_FLAG
;
}
}
PL_UNLOCK
;
}
}
/* A new item has been removed from a certain sd */
/* A new item has been removed from a certain sd */
...
...
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