[vlc-devel] [PATCH] Change position instead of time in order tohave proper callbacks called

Remi Denis-Courmont rdenis at simphalempin.com
Mon Apr 28 08:43:18 CEST 2008


In principle, that looks like a wrong hack rather than a fix to me. In
practice, it looks like it will prevent seeking inputs of unknown or
changing length.

On Sun, 20 Apr 2008 16:22:21 +0200, Clément Decoodt <clement at decoodt.eu>
wrote:
> ---
>  modules/gui/qt4/dialogs/gototime.cpp |    7 ++++++-
>  1 files changed, 6 insertions(+), 1 deletions(-)
> 
> diff --git a/modules/gui/qt4/dialogs/gototime.cpp
> b/modules/gui/qt4/dialogs/gototime.cpp
> index bf1bc1f..91f3946 100644
> --- a/modules/gui/qt4/dialogs/gototime.cpp
> +++ b/modules/gui/qt4/dialogs/gototime.cpp
> @@ -104,9 +104,14 @@ void GotoTimeDialog::close()
>  {
>      if ( THEMIM->getIM()->hasInput() )
>      {
> +        input_thread_t* p_input = THEMIM->getInput();
>          int64_t i_time = (int64_t)
>              ( QTime( 0, 0, 0 ).msecsTo( timeEdit->time() ) ) * 1000;
> -        var_SetTime( THEMIM->getInput(), "time", i_time );
> +        int64_t i_length = var_GetTime(  p_input , "length" );
> +        if( i_time < i_length )
> +        {
> +            var_SetFloat( p_input, "position", ((float)i_time)/i_length
> );
> +        }
>      }
>      toggleVisible();
>      timeEdit->setTime( QTime( 0, 0, 0) );





More information about the vlc-devel mailing list