[vlc-commits] input: hold the renderer_item from input_Create
Thomas Guillem
git at videolan.org
Fri Dec 1 15:09:55 CET 2017
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Dec 1 15:05:09 2017 +0100| [c72a13b971f8af7f02402eafd3b74d13c1dc53c5] | committer: Thomas Guillem
input: hold the renderer_item from input_Create
Doesn't fix anything, just for clarification.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c72a13b971f8af7f02402eafd3b74d13c1dc53c5
---
src/input/input.c | 4 +---
src/playlist/thread.c | 2 ++
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/input/input.c b/src/input/input.c
index af572049e6..b80f8867d7 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -326,9 +326,7 @@ static input_thread_t *Create( vlc_object_t *p_parent, input_item_t *p_item,
priv->attachment_demux = NULL;
priv->p_sout = NULL;
priv->b_out_pace_control = false;
- /* The renderer is passed after its refcount was incremented.
- * The input thread is now responsible for releasing it */
- priv->p_renderer = p_renderer;
+ priv->p_renderer = p_renderer ? vlc_renderer_item_hold( p_renderer ) : NULL;
priv->viewpoint_changed = false;
/* Fetch the viewpoint from the mediaplayer or the playlist if any */
diff --git a/src/playlist/thread.c b/src/playlist/thread.c
index 9f51054089..ef96d92d3a 100644
--- a/src/playlist/thread.c
+++ b/src/playlist/thread.c
@@ -217,6 +217,8 @@ static bool PlayItem( playlist_t *p_playlist, playlist_item_t *p_item )
input_thread_t *p_input_thread = input_Create( p_playlist, p_input, NULL,
p_sys->p_input_resource,
p_renderer );
+ if( p_renderer )
+ vlc_renderer_item_release( p_renderer );
if( likely(p_input_thread != NULL) )
{
var_AddCallback( p_input_thread, "intf-event",
More information about the vlc-commits
mailing list