Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
84ec0168
Commit
84ec0168
authored
Nov 15, 2014
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
playlist: reduce lock contention and do not pretend to handle error
parent
77fbb447
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
28 deletions
+17
-28
src/playlist/engine.c
src/playlist/engine.c
+17
-28
No files found.
src/playlist/engine.c
View file @
84ec0168
...
...
@@ -229,38 +229,27 @@ playlist_t *playlist_Create( vlc_object_t *p_parent )
pl_priv
(
p_playlist
)
->
b_tree
=
var_InheritBool
(
p_parent
,
"playlist-tree"
);
/* Create the root node */
PL_LOCK
;
p_playlist
->
p_root
=
playlist_NodeCreate
(
p_playlist
,
NULL
,
NULL
,
PLAYLIST_END
,
0
,
NULL
);
PL_UNLOCK
;
if
(
!
p_playlist
->
p_root
)
return
NULL
;
/* Create the root, playing items and meida library nodes */
playlist_item_t
*
root
,
*
playing
,
*
ml
;
/* Create currently playing items node */
PL_LOCK
;
p_playlist
->
p_playing
=
playlist_NodeCreate
(
p_playlist
,
_
(
"Playlist"
),
p_playlist
->
p_root
,
PLAYLIST_END
,
PLAYLIST_RO_FLAG
,
NULL
);
root
=
playlist_NodeCreate
(
p_playlist
,
NULL
,
NULL
,
PLAYLIST_END
,
0
,
NULL
);
playing
=
playlist_NodeCreate
(
p_playlist
,
_
(
"Playlist"
),
root
,
PLAYLIST_END
,
PLAYLIST_RO_FLAG
,
NULL
);
if
(
var_InheritBool
(
p_parent
,
"media-library"
)
)
ml
=
playlist_NodeCreate
(
p_playlist
,
_
(
"Media Library"
),
root
,
PLAYLIST_END
,
PLAYLIST_RO_FLAG
,
NULL
);
else
ml
=
NULL
;
PL_UNLOCK
;
if
(
!
p_playlist
->
p_playing
)
return
NULL
;
/* Create media library node */
const
bool
b_ml
=
var_InheritBool
(
p_parent
,
"media-library"
);
if
(
b_ml
)
{
PL_LOCK
;
p_playlist
->
p_media_library
=
playlist_NodeCreate
(
p_playlist
,
_
(
"Media Library"
),
p_playlist
->
p_root
,
PLAYLIST_END
,
PLAYLIST_RO_FLAG
,
NULL
);
PL_UNLOCK
;
}
else
{
p_playlist
->
p_media_library
=
NULL
;
}
if
(
unlikely
(
root
==
NULL
||
playing
==
NULL
||
ml
==
NULL
)
)
abort
();
p_playlist
->
p_root
=
root
;
p_playlist
->
p_playing
=
playing
;
p_playlist
->
p_media_library
=
ml
;
p_playlist
->
p_root_category
=
p_playlist
->
p_root
;
p_playlist
->
p_root_onelevel
=
p_playlist
->
p_root
;
p_playlist
->
p_local_category
=
p_playlist
->
p_playing
;
...
...
@@ -274,7 +263,7 @@ playlist_t *playlist_Create( vlc_object_t *p_parent )
pl_priv
(
p_playlist
)
->
request
.
b_request
=
false
;
pl_priv
(
p_playlist
)
->
status
.
i_status
=
PLAYLIST_STOPPED
;
if
(
b_ml
)
if
(
ml
!=
NULL
)
playlist_MLLoad
(
p_playlist
);
/* Preparser (and meta retriever) _after_ the Media Library*/
...
...
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