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
35f17389
Commit
35f17389
authored
Dec 22, 2008
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed too soon playlist items destruction.
parent
19f1b2ee
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
38 deletions
+36
-38
src/playlist/engine.c
src/playlist/engine.c
+1
-38
src/playlist/thread.c
src/playlist/thread.c
+35
-0
No files found.
src/playlist/engine.c
View file @
35f17389
...
...
@@ -177,6 +177,7 @@ static void playlist_Destructor( vlc_object_t * p_this )
playlist_t
*
p_playlist
=
(
playlist_t
*
)
p_this
;
playlist_private_t
*
p_sys
=
pl_priv
(
p_playlist
);
assert
(
!
p_sys
->
p_sout
);
assert
(
!
p_sys
->
p_preparser
);
assert
(
!
p_sys
->
p_fetcher
);
...
...
@@ -496,44 +497,6 @@ void playlist_LastLoop( playlist_t *p_playlist )
msleep
(
INTF_IDLE_SLEEP
);
}
#ifdef ENABLE_SOUT
/* close the remaining sout-keep (if there was no input atm) */
sout_instance_t
*
p_sout
=
pl_priv
(
p_playlist
)
->
p_sout
;
if
(
p_sout
)
sout_DeleteInstance
(
p_sout
);
#endif
/* Core should have terminated all SDs before the playlist */
/* TODO: It fails to do so when not playing anything -- Courmisch */
playlist_ServicesDiscoveryKillAll
(
p_playlist
);
playlist_MLDump
(
p_playlist
);
PL_LOCK
;
/* Release the current node */
set_current_status_node
(
p_playlist
,
NULL
);
/* Release the current item */
set_current_status_item
(
p_playlist
,
NULL
);
FOREACH_ARRAY
(
playlist_item_t
*
p_del
,
p_playlist
->
all_items
)
free
(
p_del
->
pp_children
);
vlc_gc_decref
(
p_del
->
p_input
);
free
(
p_del
);
FOREACH_END
();
ARRAY_RESET
(
p_playlist
->
all_items
);
FOREACH_ARRAY
(
playlist_item_t
*
p_del
,
pl_priv
(
p_playlist
)
->
items_to_delete
)
free
(
p_del
->
pp_children
);
vlc_gc_decref
(
p_del
->
p_input
);
free
(
p_del
);
FOREACH_END
();
ARRAY_RESET
(
pl_priv
(
p_playlist
)
->
items_to_delete
);
ARRAY_RESET
(
p_playlist
->
items
);
ARRAY_RESET
(
p_playlist
->
current
);
PL_UNLOCK
;
}
static
void
VariablesInit
(
playlist_t
*
p_playlist
)
...
...
src/playlist/thread.c
View file @
35f17389
...
...
@@ -30,6 +30,7 @@
#include <vlc_input.h>
#include <vlc_interface.h>
#include <vlc_playlist.h>
#include "stream_output/stream_output.h"
#include "playlist_internal.h"
/*****************************************************************************
...
...
@@ -87,7 +88,41 @@ void playlist_Deactivate( playlist_t *p_playlist )
if
(
p_sys
->
p_fetcher
)
playlist_fetcher_Delete
(
p_sys
->
p_fetcher
);
/* close the remaining sout-keep */
if
(
p_sys
->
p_sout
)
sout_DeleteInstance
(
p_sys
->
p_sout
);
/* */
playlist_MLDump
(
p_playlist
);
PL_LOCK
;
/* Release the current node */
set_current_status_node
(
p_playlist
,
NULL
);
/* Release the current item */
set_current_status_item
(
p_playlist
,
NULL
);
FOREACH_ARRAY
(
playlist_item_t
*
p_del
,
p_playlist
->
all_items
)
free
(
p_del
->
pp_children
);
vlc_gc_decref
(
p_del
->
p_input
);
free
(
p_del
);
FOREACH_END
();
ARRAY_RESET
(
p_playlist
->
all_items
);
FOREACH_ARRAY
(
playlist_item_t
*
p_del
,
pl_priv
(
p_playlist
)
->
items_to_delete
)
free
(
p_del
->
pp_children
);
vlc_gc_decref
(
p_del
->
p_input
);
free
(
p_del
);
FOREACH_END
();
ARRAY_RESET
(
pl_priv
(
p_playlist
)
->
items_to_delete
);
ARRAY_RESET
(
p_playlist
->
items
);
ARRAY_RESET
(
p_playlist
->
current
);
PL_UNLOCK
;
/* The NULL are there only to assert in playlist destructor */
p_sys
->
p_sout
=
NULL
;
p_sys
->
p_preparser
=
NULL
;
p_sys
->
p_fetcher
=
NULL
;
msg_Err
(
p_playlist
,
"Deactivated"
);
...
...
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