[vlc-devel] commit: input: don't be too clever with start-time - fixes #3042 ( Rémi Denis-Courmont )
    git version control 
    git at videolan.org
       
    Sat Aug 15 16:37:05 CEST 2009
    
    
  
vlc | branch: 1.0-bugfix | Rémi Denis-Courmont <remi at remlab.net> | Sat Aug 15 17:35:09 2009 +0300| [115ce9aaa2ecfde4f9ac61286ed8780f8bdb4764] | committer: Rémi Denis-Courmont 
input: don't be too clever with start-time - fixes #3042
Deeper code can cope with too overly large values.
We need to accept seemingly too far start times because the length is
typically not known at startup (and hence set to zero).
(cherry picked from commit 3629d607068977740039ecdf8084f22987b0b83f)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=115ce9aaa2ecfde4f9ac61286ed8780f8bdb4764
---
 src/input/input.c |   17 +++++------------
 1 files changed, 5 insertions(+), 12 deletions(-)
diff --git a/src/input/input.c b/src/input/input.c
index 8c38dba..be4eb7b 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -958,20 +958,13 @@ static void StartTitle( input_thread_t * p_input )
     const mtime_t i_length = var_GetTime( p_input, "length" );
     if( p_input->p->i_start > 0 )
     {
-        if( p_input->p->i_start >= i_length )
-        {
-            msg_Warn( p_input, "invalid start-time ignored" );
-        }
-        else
-        {
-            vlc_value_t s;
+        vlc_value_t s;
 
-            msg_Dbg( p_input, "starting at time: %ds",
-                              (int)( p_input->p->i_start / INT64_C(1000000) ) );
+        msg_Dbg( p_input, "starting at time: %ds",
+                 (int)( p_input->p->i_start / INT64_C(1000000) ) );
 
-            s.i_time = p_input->p->i_start;
-            input_ControlPush( p_input, INPUT_CONTROL_SET_TIME, &s );
-        }
+        s.i_time = p_input->p->i_start;
+        input_ControlPush( p_input, INPUT_CONTROL_SET_TIME, &s );
     }
     if( p_input->p->i_stop > 0 && p_input->p->i_stop <= p_input->p->i_start )
     {
    
    
More information about the vlc-devel
mailing list