lib/media_player: use double for the position

This commit is contained in:
Thomas Guillem 2022-08-03 13:07:39 +02:00 committed by Jean-Baptiste Kempf
parent d5e785b062
commit da687b726a
3 changed files with 4 additions and 4 deletions

View File

@ -285,7 +285,7 @@ typedef struct libvlc_event_t
} media_player_chapter_changed;
struct
{
float new_position;
double new_position;
} media_player_position_changed;
struct
{

View File

@ -1158,7 +1158,7 @@ LIBVLC_API int libvlc_media_player_set_time( libvlc_media_player_t *p_mi,
* \param p_mi the Media Player
* \return movie position, or -1. in case of error
*/
LIBVLC_API float libvlc_media_player_get_position( libvlc_media_player_t *p_mi );
LIBVLC_API double libvlc_media_player_get_position( libvlc_media_player_t *p_mi );
/**
* Set movie position as percentage between 0.0 and 1.0.

View File

@ -1310,12 +1310,12 @@ int libvlc_media_player_set_position( libvlc_media_player_t *p_mi,
return 0;
}
float libvlc_media_player_get_position( libvlc_media_player_t *p_mi )
double libvlc_media_player_get_position( libvlc_media_player_t *p_mi )
{
vlc_player_t *player = p_mi->player;
vlc_player_Lock(player);
float f_position = vlc_player_GetPosition(player);
double f_position = vlc_player_GetPosition(player);
vlc_player_Unlock(player);
return f_position;