[vlc-devel] commit: Checked demux_Control return value in input. (Laurent Aimar )

git version control git at videolan.org
Fri Oct 23 23:14:53 CEST 2009


vlc | branch: 1.0-bugfix | Laurent Aimar <fenrir at videolan.org> | Thu Sep  3 22:25:20 2009 +0200| [10c55fc8e7bbb91b2a5f69854449c567dfec5e18] | committer: Laurent Aimar 

Checked demux_Control return value in input.
(cherry picked from commit 81900b24626f581e2cd68ad34151f0da7a6938b5)

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

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

diff --git a/src/input/input.c b/src/input/input.c
index 90e255a..91f81dd 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -1664,9 +1664,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,
@@ -2426,8 +2425,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 ) );
 
 




More information about the vlc-devel mailing list