vlc | branch: master | Francois Cartegnie <fcvlc...@free.fr> | Thu Dec 3 16:07:46 2020 +0100| [3781e1dca6f5bdbb945f3d38941abd8560817db9] | committer: Francois Cartegnie
input: unknown length is zero This partially reverts commit d34852727700e98ef5533bfdaead574ec1700f2a. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3781e1dca6f5bdbb945f3d38941abd8560817db9 --- src/input/es_out.c | 2 +- src/input/input.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/input/es_out.c b/src/input/es_out.c index ab3134ab9f..7d178a5e78 100644 --- a/src/input/es_out.c +++ b/src/input/es_out.c @@ -3701,7 +3701,7 @@ static int EsOutVaPrivControlLocked( es_out_t *out, int query, va_list args ) i_time = VLC_TICK_0; } - if( i_length != VLC_TICK_INVALID ) + if( i_length != 0 ) f_position -= (double)i_delay / i_length; if( f_position < 0 ) f_position = 0; diff --git a/src/input/input.c b/src/input/input.c index dafead8408..730d99db01 100644 --- a/src/input/input.c +++ b/src/input/input.c @@ -630,7 +630,7 @@ static void MainLoopStatistics( input_thread_t *p_input ) i_time = VLC_TICK_INVALID; if( demux_Control( priv->master->p_demux, DEMUX_GET_LENGTH, &i_length ) ) - i_length = VLC_TICK_INVALID; + i_length = 0; /* In case of failure (not implemented or in case of seek), use the last * normal_time value (that is VLC_TICK_0 by default). */ @@ -1288,8 +1288,8 @@ static int Init( input_thread_t * p_input ) /* Init length */ vlc_tick_t i_length; if( demux_Control( master->p_demux, DEMUX_GET_LENGTH, &i_length ) ) - i_length = VLC_TICK_INVALID; - if( i_length == VLC_TICK_INVALID ) + i_length = 0; + if( i_length == 0 ) i_length = input_item_GetDuration( priv->p_item ); input_SendEventTimes( p_input, 0.0, VLC_TICK_INVALID, priv->normal_time, _______________________________________________ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits