]> git.sesse.net Git - vlc/commitdiff
Checked demux_Control return value in input.
authorLaurent Aimar <fenrir@videolan.org>
Thu, 3 Sep 2009 20:25:20 +0000 (22:25 +0200)
committerLaurent Aimar <fenrir@videolan.org>
Thu, 3 Sep 2009 20:40:01 +0000 (22:40 +0200)
src/input/input.c

index f179a6711ed4bec392191c6e0ea89b98d9e1f48a..5db01b47797eef890fbb2ec65be189f429c343c0 100644 (file)
@@ -1669,9 +1669,8 @@ static bool Control( input_thread_t *p_input,
                 int64_t i_length;
 
                 /* Emulate it with a SET_POS */
-                demux_Control( p_input->p->input.p_demux,
-                                DEMUX_GET_LENGTH, &i_length );
-                if( i_length > 0 )
+                if( !demux_Control( p_input->p->input.p_demux,
+                                    DEMUX_GET_LENGTH, &i_length ) && i_length > 0 )
                 {
                     double f_pos = (double)i_time / (double)i_length;
                     i_ret = demux_Control( p_input->p->input.p_demux,
@@ -2429,8 +2428,9 @@ static int InputSourceInit( input_thread_t *p_input,
     if( in->p_demux )
     {
         /* Get infos from access_demux */
-        demux_Control( in->p_demux,
-                        DEMUX_GET_PTS_DELAY, &in->i_pts_delay );
+        int i_ret = demux_Control( in->p_demux,
+                                   DEMUX_GET_PTS_DELAY, &in->i_pts_delay );
+        assert( !i_ret );
         in->i_pts_delay = __MAX( 0, __MIN( in->i_pts_delay, INPUT_PTS_DELAY_MAX ) );