* Preamble
*****************************************************************************/
#include <stdlib.h> /* malloc(), free() */
+#include <math.h>
#include <vlc/vlc.h>
#include <vlc/intf.h>
{
i_action = p_hotkeys[i].i_action;
i_times = p_hotkeys[i].i_times; /* times key pressed within max. delta time */
+ p_hotkeys[i].i_times = 0;
}
}
}
else if( i_action == ACTIONID_JUMP_BACKWARD_3SEC && b_seekable )
{
- val.i_time = (-3000000 * 2^i_times);
+ val.i_time = (-3000000 * ((mtime_t)pow(2,i_times)));
var_Set( p_input, "time-offset", val );
DisplayPosition( p_intf, p_vout, p_input );
}
else if( i_action == ACTIONID_JUMP_FORWARD_3SEC && b_seekable )
{
- val.i_time = (3000000 * 2^i_times);
+ val.i_time = (3000000 * ((mtime_t)pow(2,i_times)));
var_Set( p_input, "time-offset", val );
DisplayPosition( p_intf, p_vout, p_input );
}
else if( i_action == ACTIONID_JUMP_BACKWARD_10SEC && b_seekable )
{
- val.i_time = (-10000000 * 2^i_times);
+ val.i_time = (-10000000 * ((mtime_t)pow(2,i_times)));
var_Set( p_input, "time-offset", val );
DisplayPosition( p_intf, p_vout, p_input );
}
else if( i_action == ACTIONID_JUMP_FORWARD_10SEC && b_seekable )
{
- val.i_time = (10000000 * 2^i_times);
+ val.i_time = (10000000 * ((mtime_t)pow(2,i_times)));
var_Set( p_input, "time-offset", val );
DisplayPosition( p_intf, p_vout, p_input );
}
else if( i_action == ACTIONID_JUMP_BACKWARD_1MIN && b_seekable )
{
- val.i_time = (-60000000 * 2^i_times);
+ val.i_time = (-60000000 * ((mtime_t)pow(2,i_times)));
var_Set( p_input, "time-offset", val );
DisplayPosition( p_intf, p_vout, p_input );
}
else if( i_action == ACTIONID_JUMP_FORWARD_1MIN && b_seekable )
{
- val.i_time = (60000000 * 2^i_times);
+ val.i_time = (60000000 * ((mtime_t)pow(2,i_times)));
var_Set( p_input, "time-offset", val );
DisplayPosition( p_intf, p_vout, p_input );
}
else if( i_action == ACTIONID_JUMP_BACKWARD_5MIN && b_seekable )
{
- val.i_time = (-300000000 * 2^i_times);
+ val.i_time = (-300000000 * ((mtime_t)pow(2,i_times)));
var_Set( p_input, "time-offset", val );
DisplayPosition( p_intf, p_vout, p_input );
}
else if( i_action == ACTIONID_JUMP_FORWARD_5MIN && b_seekable )
{
- val.i_time = (300000000 * 2^i_times);
+ val.i_time = (300000000 * ((mtime_t)pow(2,i_times)));
var_Set( p_input, "time-offset", val );
DisplayPosition( p_intf, p_vout, p_input );
}