Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Steve Lhomme
VLC
Commits
55ba1763
Commit
55ba1763
authored
Feb 06, 2010
by
Rémi Denis-Courmont
Browse files
Keep the instance until after the media player is destroyed
parent
96793133
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/control/media_player.c
View file @
55ba1763
...
...
@@ -415,6 +415,7 @@ libvlc_media_player_new( libvlc_instance_t *instance )
*/
var_AddCallback
(
mp
->
p_libvlc
,
"snapshot-file"
,
snapshot_was_taken
,
mp
);
libvlc_retain
(
instance
);
return
mp
;
}
...
...
@@ -466,7 +467,10 @@ static void libvlc_media_player_destroy( libvlc_media_player_t *p_mi )
libvlc_event_manager_release
(
p_mi
->
p_event_manager
);
libvlc_media_release
(
p_mi
->
p_md
);
vlc_mutex_destroy
(
&
p_mi
->
object_lock
);
libvlc_instance_t
*
instance
=
p_mi
->
p_libvlc_instance
;
vlc_object_release
(
p_mi
);
libvlc_release
(
instance
);
}
/**************************************************************************
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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