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
948676af
Commit
948676af
authored
Aug 27, 2006
by
Clément Stenac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for deletion of current item
parent
9e11182b
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
7 deletions
+20
-7
include/vlc_playlist.h
include/vlc_playlist.h
+2
-0
src/input/item.c
src/input/item.c
+1
-0
src/playlist/control.c
src/playlist/control.c
+3
-1
src/playlist/engine.c
src/playlist/engine.c
+10
-5
src/playlist/item.c
src/playlist/item.c
+4
-1
No files found.
include/vlc_playlist.h
View file @
948676af
...
...
@@ -464,4 +464,6 @@ static inline vlc_bool_t playlist_IsEmpty( playlist_t * p_playlist )
#define PL_DEBUG( msg, args ... ) {}
#endif
#define PLI_NAME( p ) p ? p->p_input->psz_name : "null"
#endif
src/input/item.c
View file @
948676af
...
...
@@ -76,6 +76,7 @@ static void vlc_input_item_Destroy ( gc_object_t *p_this )
playlist_t
*
p_playlist
=
(
playlist_t
*
)
vlc_object_find
(
p_obj
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
fprintf
(
stderr
,
"Destroying %s
\n
"
,
p_input
->
psz_name
);
vlc_input_item_Clean
(
p_input
);
if
(
p_playlist
)
...
...
src/playlist/control.c
View file @
948676af
...
...
@@ -327,7 +327,9 @@ playlist_item_t * playlist_NextItem( playlist_t *p_playlist )
/* Start the real work */
if
(
p_playlist
->
request
.
b_request
)
{
PL_DEBUG
(
"processing request"
);
PL_DEBUG
(
"processing request node %s item %s skip %i"
,
PLI_NAME
(
p_playlist
->
request
.
p_item
),
PLI_NAME
(
p_playlist
->
request
.
p_node
),
i_skip
);
p_new
=
p_playlist
->
request
.
p_item
;
i_skip
=
p_playlist
->
request
.
i_skip
;
...
...
src/playlist/engine.c
View file @
948676af
...
...
@@ -223,6 +223,7 @@ void playlist_MainLoop( playlist_t *p_playlist )
{
int
i_activity
;
input_thread_t
*
p_input
;
PL_DEBUG
(
"dead input"
);
p_input
=
p_playlist
->
p_input
;
p_playlist
->
p_input
=
NULL
;
...
...
@@ -247,6 +248,8 @@ void playlist_MainLoop( playlist_t *p_playlist )
if
(
p_playlist
->
status
.
p_item
->
i_flags
&
PLAYLIST_REMOVE_FLAG
)
{
PL_DEBUG
(
"%s was marked for deletion, deleting"
,
PLI_NAME
(
p_playlist
->
status
.
p_item
)
);
playlist_ItemDelete
(
p_playlist
->
status
.
p_item
);
if
(
p_playlist
->
request
.
p_item
==
p_playlist
->
status
.
p_item
)
p_playlist
->
request
.
p_item
=
NULL
;
...
...
@@ -262,12 +265,13 @@ void playlist_MainLoop( playlist_t *p_playlist )
/* This input is dying, let it do */
else
if
(
p_playlist
->
p_input
->
b_die
)
{
;
PL_DEBUG
(
"dying input"
)
;
}
/* This input has finished, ask it to die ! */
else
if
(
p_playlist
->
p_input
->
b_error
||
p_playlist
->
p_input
->
b_eof
)
{
PL_DEBUG
(
"finished input"
);
input_StopThread
(
p_playlist
->
p_input
);
/* Select the next playlist item */
PL_UNLOCK
...
...
@@ -275,7 +279,7 @@ void playlist_MainLoop( playlist_t *p_playlist )
}
else
if
(
p_playlist
->
p_input
->
i_state
!=
INIT_S
)
{
PL_UNLOCK
PL_UNLOCK
;
p_playlist
->
i_vout_destroyed_date
=
ObjectGarbageCollector
(
p_playlist
,
VLC_OBJECT_VOUT
,
p_playlist
->
i_vout_destroyed_date
);
...
...
@@ -298,7 +302,7 @@ void playlist_MainLoop( playlist_t *p_playlist )
(
p_playlist
->
request
.
b_request
&&
p_playlist
->
request
.
i_status
!=
PLAYLIST_STOPPED
)
)
{
msg_Dbg
(
p_playlist
,
"
S
tarting new item"
);
msg_Dbg
(
p_playlist
,
"
s
tarting new item"
);
stats_TimerStart
(
p_playlist
,
"Playlist walk"
,
STATS_TIMER_PLAYLIST_WALK
);
p_item
=
playlist_NextItem
(
p_playlist
);
...
...
@@ -315,10 +319,11 @@ void playlist_MainLoop( playlist_t *p_playlist )
}
else
{
if
(
p_
item
&&
p_
playlist
->
status
.
p_item
&&
if
(
p_playlist
->
status
.
p_item
&&
p_playlist
->
status
.
p_item
->
i_flags
&
PLAYLIST_REMOVE_FLAG
)
{
playlist_ItemDelete
(
p_item
);
PL_DEBUG
(
"deleting item marked for deletion"
);
playlist_ItemDelete
(
p_playlist
->
status
.
p_item
);
p_playlist
->
status
.
p_item
=
NULL
;
}
...
...
src/playlist/item.c
View file @
948676af
...
...
@@ -632,7 +632,7 @@ int DeleteInner( playlist_t * p_playlist, playlist_item_t *p_item,
/* Hack we don't call playlist_Control for lock reasons */
if
(
b_stop
)
{
p_playlist
->
status
.
i_status
=
PLAYLIST_STOPPED
;
p_playlist
->
request
.
i_status
=
PLAYLIST_STOPPED
;
p_playlist
->
request
.
b_request
=
VLC_TRUE
;
p_playlist
->
request
.
p_item
=
NULL
;
msg_Info
(
p_playlist
,
"stopping playback"
);
...
...
@@ -648,7 +648,10 @@ int DeleteInner( playlist_t * p_playlist, playlist_item_t *p_item,
if
(
b_flag
==
VLC_FALSE
)
playlist_ItemDelete
(
p_item
);
else
{
PL_DEBUG
(
"marking %s for further deletion"
,
PLI_NAME
(
p_item
)
);
p_item
->
i_flags
|=
PLAYLIST_REMOVE_FLAG
;
}
return
VLC_SUCCESS
;
}
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