[vlc-devel] commit: vod preparsing : if muxer is specified, only wait for input_item_IsPreparsed ( Sébastien Escudier )

git version control git at videolan.org
Mon Sep 14 17:22:20 CEST 2009


vlc | branch: master | Sébastien Escudier <sebastien-devel at celeos.eu> | Fri Sep 11 11:30:36 2009 +0200| [41d8d0bec7477ac4340f6c647019f7dc418f27f4] | committer: Rémi Denis-Courmont 

vod preparsing : if muxer is specified, only wait for input_item_IsPreparsed

Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=41d8d0bec7477ac4340f6c647019f7dc418f27f4
---

 src/input/vlm.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/input/vlm.c b/src/input/vlm.c
index 8acce0c..7fb098d 100644
--- a/src/input/vlm.c
+++ b/src/input/vlm.c
@@ -75,7 +75,8 @@ static int InputEventPreparse( vlc_object_t *p_this, char const *psz_cmd,
     VLC_UNUSED(p_this); VLC_UNUSED(psz_cmd); VLC_UNUSED(oldval);
     vlc_sem_t *p_sem_preparse = p_data;
 
-    if( newval.i_int == INPUT_EVENT_DEAD )
+    if( newval.i_int == INPUT_EVENT_DEAD ||
+        newval.i_int == INPUT_EVENT_ITEM_META )
         vlc_sem_post( p_sem_preparse );
 
     return VLC_SUCCESS;
@@ -574,7 +575,7 @@ static int vlm_OnMediaUpdate( vlm_t *p_vlm, vlm_media_sys_t *p_media )
                 vlc_sem_init( &sem_preparse, 0 );
                 var_AddCallback( p_input, "intf-event", InputEventPreparse, &sem_preparse );
 
-                if( !p_input->b_dead )
+                while( !p_input->b_dead && ( !p_cfg->vod.psz_mux || !input_item_IsPreparsed( p_media->vod.p_item ) ) )
                     vlc_sem_wait( &sem_preparse );
 
                 var_DelCallback( p_input, "intf-event", InputEventPreparse, &sem_preparse );




More information about the vlc-devel mailing list