Commit e86b6a0a authored by Laurent Aimar's avatar Laurent Aimar

Do not use p_demux->p_parent to get the p_input

(Use vlc_find_object(PARENT)
parent e7a8394a
......@@ -2212,11 +2212,14 @@ static void MP4_TrackSetELST( demux_t *p_demux, mp4_track_t *tk,
static vlc_bool_t FindItem( demux_t *p_demux, playlist_t *p_playlist,
playlist_item_t **pp_item )
{
input_thread_t *p_input = (input_thread_t *)vlc_object_find( p_demux, VLC_OBJECT_INPUT, FIND_PARENT );
vlc_bool_t b_play = var_CreateGetBool( p_demux, "playlist-autostart" );
*pp_item = NULL;
if( p_input )
{
if( b_play && p_playlist->status.p_item &&
p_playlist->status.p_item->p_input ==
input_GetItem((input_thread_t *)p_demux->p_parent))
p_playlist->status.p_item->p_input == input_GetItem(p_input) )
{
msg_Dbg( p_playlist, "starting playlist playback" );
*pp_item = p_playlist->status.p_item;
......@@ -2224,16 +2227,17 @@ static vlc_bool_t FindItem( demux_t *p_demux, playlist_t *p_playlist,
}
else
{
input_item_t *p_current = input_GetItem(
(input_thread_t*)p_demux->p_parent);
input_item_t *p_current = input_GetItem( p_input );
*pp_item = playlist_ItemGetByInput( p_playlist, p_current, VLC_FALSE );
if( !*pp_item )
{
msg_Dbg( p_playlist, "unable to find item in playlist");
}
msg_Dbg( p_playlist, "not starting playlist playback");
b_play = VLC_FALSE;
}
vlc_object_release( p_input );
}
return b_play;
}
......
......@@ -179,6 +179,7 @@ static void Ogg_ReadAnnodexHeader( vlc_object_t *, logical_stream_t *, ogg_packe
static int Open( vlc_object_t * p_this )
{
demux_t *p_demux = (demux_t *)p_this;
input_thread_t *p_input;
demux_sys_t *p_sys;
uint8_t *p_peek;
......@@ -203,17 +204,20 @@ static int Open( vlc_object_t * p_this )
p_sys->i_eos = 0;
if( ((input_thread_t* )(p_demux->p_parent ))->b_preparsing == VLC_TRUE )
p_input = (input_thread_t *)vlc_object_find( p_demux, VLC_OBJECT_INPUT, FIND_PARENT );
if( p_input && p_input->b_preparsing )
{
module_t *p_meta = module_Need( p_demux, "meta reader", NULL, 0 );
if( p_meta )
{
vlc_meta_Merge( input_GetItem((input_thread_t* )(p_demux->p_parent ))->p_meta,
(vlc_meta_t*)(p_demux->p_private ) );
vlc_meta_Merge( input_GetItem(p_input)->p_meta, (vlc_meta_t*)(p_demux->p_private ) );
module_Unneed( p_demux, p_meta );
}
vlc_object_release( p_input );
return VLC_SUCCESS;
}
if( p_input )
vlc_object_release( p_input );
/* Initialize the Ogg physical bitstream parser */
ogg_sync_init( &p_sys->oy );
......
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