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
2d970fe0
Commit
2d970fe0
authored
Jun 10, 2007
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Call garbage collector (vout/sout) when playlist enter stop state (on
user stop or end of playlist).
parent
ac586317
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
10 deletions
+17
-10
src/playlist/engine.c
src/playlist/engine.c
+17
-10
No files found.
src/playlist/engine.c
View file @
2d970fe0
...
...
@@ -178,10 +178,12 @@ void playlist_Destroy( playlist_t *p_playlist )
}
/* Destroy remaining objects */
static
void
ObjectGarbageCollector
(
playlist_t
*
p_playlist
)
static
void
ObjectGarbageCollector
(
playlist_t
*
p_playlist
,
vlc_bool_t
b_force
)
{
vlc_object_t
*
p_obj
;
if
(
!
b_force
)
{
if
(
mdate
()
-
p_playlist
->
gc_date
<
1000000
)
{
p_playlist
->
b_cant_sleep
=
VLC_TRUE
;
...
...
@@ -189,12 +191,13 @@ static void ObjectGarbageCollector( playlist_t *p_playlist )
}
else
if
(
p_playlist
->
gc_date
==
0
)
return
;
}
vlc_mutex_lock
(
&
p_playlist
->
gc_lock
);
while
(
(
p_obj
=
vlc_object_find
(
p_playlist
,
VLC_OBJECT_VOUT
,
FIND_CHILD
)
)
)
{
if
(
p_obj
->
p_parent
!=
(
vlc_object_t
*
)
p_playlist
)
if
(
p_obj
->
p_parent
!=
VLC_OBJECT
(
p_playlist
)
)
{
vlc_object_release
(
p_obj
);
break
;
...
...
@@ -207,7 +210,7 @@ static void ObjectGarbageCollector( playlist_t *p_playlist )
while
(
(
p_obj
=
vlc_object_find
(
p_playlist
,
VLC_OBJECT_SOUT
,
FIND_CHILD
)
)
)
{
if
(
p_obj
->
p_parent
!=
(
vlc_object_t
*
)
p_playlist
)
if
(
p_obj
->
p_parent
!=
VLC_OBJECT
(
p_playlist
)
)
{
vlc_object_release
(
p_obj
);
break
;
...
...
@@ -305,7 +308,7 @@ check_input:
else
if
(
p_playlist
->
p_input
->
i_state
!=
INIT_S
)
{
PL_UNLOCK
;
ObjectGarbageCollector
(
p_playlist
);
ObjectGarbageCollector
(
p_playlist
,
VLC_FALSE
);
PL_LOCK
;
}
}
...
...
@@ -335,12 +338,16 @@ check_input:
}
p_playlist
->
status
.
i_status
=
PLAYLIST_STOPPED
;
PL_UNLOCK
ObjectGarbageCollector
(
p_playlist
,
VLC_TRUE
);
return
;
}
playlist_PlayItem
(
p_playlist
,
p_item
);
}
else
{
const
vlc_bool_t
b_gc_forced
=
p_playlist
->
status
.
i_status
!=
PLAYLIST_STOPPED
;
p_playlist
->
status
.
i_status
=
PLAYLIST_STOPPED
;
if
(
p_playlist
->
status
.
p_item
&&
p_playlist
->
status
.
p_item
->
i_flags
&
PLAYLIST_REMOVE_FLAG
)
...
...
@@ -352,7 +359,7 @@ check_input:
/* Collect garbage */
PL_UNLOCK
;
ObjectGarbageCollector
(
p_playlist
);
ObjectGarbageCollector
(
p_playlist
,
b_gc_forced
);
PL_LOCK
;
}
}
...
...
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