From 67a692ba3969f212d28ae2b99da59389df54f0b7 Mon Sep 17 00:00:00 2001 From: Pierre Ynard Date: Fri, 5 Feb 2010 10:55:39 +0100 Subject: [PATCH] vlm: make vod input objects children of vod server Currently, input objects of VoD media instances are children of the libvlc object; this patch makes them children of the VoD server object instead. This will provide simpler and cleaner communication means. --- src/input/vlm.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/input/vlm.c b/src/input/vlm.c index dee9c530da..b48352695e 100644 --- a/src/input/vlm.c +++ b/src/input/vlm.c @@ -566,7 +566,7 @@ static int vlm_OnMediaUpdate( vlm_t *p_vlm, vlm_media_sys_t *p_media ) if( asprintf( &psz_header, _("Media: %s"), p_cfg->psz_name ) == -1 ) psz_header = NULL; - p_input = input_Create( p_vlm->p_libvlc, p_media->vod.p_item, psz_header, NULL ); + p_input = input_Create( p_vlm->p_vod, p_media->vod.p_item, psz_header, NULL ); if( p_input ) { vlc_sem_t sem_preparse; @@ -932,7 +932,10 @@ static int vlm_ControlMediaInstanceStart( vlm_t *p_vlm, int64_t id, const char * if( asprintf( &psz_log, _("Media: %s"), p_media->cfg.psz_name ) != -1 ) { - p_instance->p_input = input_Create( p_vlm->p_libvlc, p_instance->p_item, + vlc_object_t *p_parent = p_media->cfg.b_vod ? + VLC_OBJECT(p_vlm->p_vod) : + VLC_OBJECT(p_vlm->p_libvlc); + p_instance->p_input = input_Create( p_parent, p_instance->p_item, psz_log, p_instance->p_input_resource ); if( p_instance->p_input ) { -- 2.39.2