Commit 31f2a813 authored by Thomas Guillem's avatar Thomas Guillem

input: hold the renderer_item from input_Create

Doesn't fix anything, just for clarification.

(cherry picked from commit c72a13b9)
parent 86087fb4
......@@ -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 */
......
......@@ -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",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment