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
f88693fe
Commit
f88693fe
authored
Feb 11, 2009
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Playlist have to be lock for playlist_ItemGetByInput too.
parent
7e4419bc
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
21 deletions
+15
-21
include/vlc_playlist.h
include/vlc_playlist.h
+1
-1
modules/control/http/rpn.c
modules/control/http/rpn.c
+3
-2
modules/gui/macosx/playlist.m
modules/gui/macosx/playlist.m
+2
-2
modules/gui/macosx/wizard.m
modules/gui/macosx/wizard.m
+1
-1
src/playlist/search.c
src/playlist/search.c
+8
-15
No files found.
include/vlc_playlist.h
View file @
f88693fe
...
...
@@ -323,7 +323,7 @@ VLC_EXPORT( playlist_item_t*, playlist_ItemToNode, (playlist_t *,playlist_item_t
/********************************** Item search *************************/
VLC_EXPORT
(
playlist_item_t
*
,
playlist_ItemGetById
,
(
playlist_t
*
,
int
)
);
VLC_EXPORT
(
playlist_item_t
*
,
playlist_ItemGetByInput
,
(
playlist_t
*
,
input_item_t
*
,
bool
)
);
VLC_EXPORT
(
playlist_item_t
*
,
playlist_ItemGetByInput
,
(
playlist_t
*
,
input_item_t
*
)
);
VLC_EXPORT
(
playlist_item_t
*
,
playlist_ItemGetByInputId
,
(
playlist_t
*
,
int
,
playlist_item_t
*
)
);
VLC_EXPORT
(
int
,
playlist_LiveSearchUpdate
,
(
playlist_t
*
,
playlist_item_t
*
,
const
char
*
)
);
...
...
modules/control/http/rpn.c
View file @
f88693fe
...
...
@@ -854,11 +854,12 @@ void EvaluateRPN( intf_thread_t *p_intf, mvar_t *vars,
{
playlist_item_t
*
p_item
;
msg_Dbg
(
p_intf
,
"requested mrl add: %s"
,
mrl
);
playlist_Lock
(
p_sys
->
p_playlist
);
p_item
=
playlist_ItemGetByInput
(
p_sys
->
p_playlist
,
p_input
,
pl_Unlocked
);
p_input
);
if
(
p_item
)
i_ret
=
p_item
->
i_id
;
playlist_Unlock
(
p_sys
->
p_playlist
);
}
else
msg_Warn
(
p_intf
,
"adding mrl %s failed"
,
mrl
);
...
...
modules/gui/macosx/playlist.m
View file @
f88693fe
...
...
@@ -1120,7 +1120,7 @@
{
playlist_item_t
*
p_item
=
NULL
;
playlist_item_t
*
p_node
=
NULL
;
p_item
=
playlist_ItemGetByInput
(
p_playlist
,
p_input
,
pl_Locked
);
p_item
=
playlist_ItemGetByInput
(
p_playlist
,
p_input
);
if
(
p_item
)
{
if
(
p_item
->
i_children
==
-
1
)
...
...
@@ -1173,7 +1173,7 @@
if
(
i_item
==
0
&&
!
b_enqueue
)
{
playlist_item_t
*
p_item
;
p_item
=
playlist_ItemGetByInput
(
p_playlist
,
p_input
,
pl_Locked
);
p_item
=
playlist_ItemGetByInput
(
p_playlist
,
p_input
);
playlist_Control
(
p_playlist
,
PLAYLIST_VIEWPLAY
,
pl_Locked
,
p_node
,
p_item
);
}
PL_UNLOCK
;
...
...
modules/gui/macosx/wizard.m
View file @
f88693fe
...
...
@@ -1312,7 +1312,7 @@ static VLCWizard *_o_sharedInstance = nil;
{
/* play the first item and add the others afterwards */
PL_LOCK
;
playlist_item_t
*
p_item
=
playlist_ItemGetByInput
(
p_playlist
,
p_input
,
pl_Locked
);
playlist_item_t
*
p_item
=
playlist_ItemGetByInput
(
p_playlist
,
p_input
);
playlist_Control
(
p_playlist
,
PLAYLIST_VIEWPLAY
,
pl_Locked
,
NULL
,
p_item
);
PL_UNLOCK
;
...
...
src/playlist/search.c
View file @
f88693fe
...
...
@@ -53,36 +53,29 @@ playlist_item_t* playlist_ItemGetById( playlist_t * p_playlist , int i_id )
/**
* Search an item by its input_item_t
*
*
\param p_playlist
the playlist
*
\param p_item
the input_item_t to find
*
\
return the item, or NULL on failure
*
The playlist have to be locked
*
@param p_playlist:
the playlist
*
@param p_item:
the input_item_t to find
*
@
return the item, or NULL on failure
*/
playlist_item_t
*
playlist_ItemGetByInput
(
playlist_t
*
p_playlist
,
input_item_t
*
p_item
,
bool
b_locked
)
playlist_item_t
*
playlist_ItemGetByInput
(
playlist_t
*
p_playlist
,
input_item_t
*
p_item
)
{
int
i
;
PL_
LOCK_IF
(
!
b_locked
)
;
PL_
ASSERT_LOCKED
;
if
(
get_current_status_item
(
p_playlist
)
&&
get_current_status_item
(
p_playlist
)
->
p_input
==
p_item
)
{
/* FIXME: this is potentially dangerous, we could destroy
* p_ret any time soon */
playlist_item_t
*
p_ret
=
get_current_status_item
(
p_playlist
);
PL_UNLOCK_IF
(
!
b_locked
);
return
p_ret
;
return
get_current_status_item
(
p_playlist
);
}
/** \todo Check if this is always incremental and whether we can bsearch */
for
(
i
=
0
;
i
<
p_playlist
->
all_items
.
i_size
;
i
++
)
{
if
(
ARRAY_VAL
(
p_playlist
->
all_items
,
i
)
->
p_input
->
i_id
==
p_item
->
i_id
)
{
PL_UNLOCK_IF
(
!
b_locked
);
return
ARRAY_VAL
(
p_playlist
->
all_items
,
i
);
}
}
PL_UNLOCK_IF
(
!
b_locked
);
return
NULL
;
}
...
...
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