Commit bd6df8a9 authored by Laurent Aimar's avatar Laurent Aimar
Browse files

Do not use p_demux->p_parent to get the p_input

(Use vlc_find_object(PARENT)
parent 719ff97c
...@@ -70,8 +70,8 @@ void E_(Close_GVP) ( vlc_object_t * ); ...@@ -70,8 +70,8 @@ void E_(Close_GVP) ( vlc_object_t * );
#define INIT_PLAYLIST_STUFF \ #define INIT_PLAYLIST_STUFF \
playlist_t *p_playlist = pl_Yield( p_demux ); \ playlist_t *p_playlist = pl_Yield( p_demux ); \
vlc_bool_t b_play = var_CreateGetBool( p_demux, "playlist-autostart" ); \ vlc_bool_t b_play = var_CreateGetBool( p_demux, "playlist-autostart" ); \
input_item_t *p_current_input = input_GetItem( \ input_thread_t *p_input_thread = (input_thread_t *)vlc_object_find( p_demux, VLC_OBJECT_INPUT, FIND_PARENT ); \
(input_thread_t*)p_demux->p_parent); \ input_item_t *p_current_input = input_GetItem( p_input_thread ); \
playlist_item_t *p_current = \ playlist_item_t *p_current = \
playlist_ItemGetByInput( p_playlist, p_current_input, VLC_FALSE ); \ playlist_ItemGetByInput( p_playlist, p_current_input, VLC_FALSE ); \
playlist_item_t *p_item_in_category = \ playlist_item_t *p_item_in_category = \
...@@ -85,4 +85,6 @@ void E_(Close_GVP) ( vlc_object_t * ); ...@@ -85,4 +85,6 @@ void E_(Close_GVP) ( vlc_object_t * );
/* Go back and play the playlist */ \ /* Go back and play the playlist */ \
if( b_play && p_item_in_category ) \ if( b_play && p_item_in_category ) \
playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, VLC_TRUE, p_item_in_category, NULL ); \ playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, VLC_TRUE, p_item_in_category, NULL ); \
vlc_object_release( p_input_thread ); \
vlc_object_release( p_playlist ); vlc_object_release( p_playlist );
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