Commit bb830b76 authored by Olivier Aubert's avatar Olivier Aubert

Have (and document) libvlc_media_get_duration return ms

in order to be consistent with other libvlc methods (libvlc_media_player_get_length, get_time, ...)
parent 53605c9a
...@@ -263,7 +263,7 @@ VLC_PUBLIC_API libvlc_event_manager_t * ...@@ -263,7 +263,7 @@ VLC_PUBLIC_API libvlc_event_manager_t *
libvlc_exception_t * p_e ); libvlc_exception_t * p_e );
/** /**
* Get duration of media descriptor object item. * Get duration (in ms) of media descriptor object item.
* *
* \param p_md media descriptor object * \param p_md media descriptor object
* \param p_e an initialized exception object * \param p_e an initialized exception object
......
...@@ -535,7 +535,7 @@ libvlc_media_event_manager( libvlc_media_t * p_md, ...@@ -535,7 +535,7 @@ libvlc_media_event_manager( libvlc_media_t * p_md,
} }
/************************************************************************** /**************************************************************************
* Get duration of media object. * Get duration of media object (in ms)
**************************************************************************/ **************************************************************************/
int64_t int64_t
libvlc_media_get_duration( libvlc_media_t * p_md, libvlc_media_get_duration( libvlc_media_t * p_md,
...@@ -549,7 +549,7 @@ libvlc_media_get_duration( libvlc_media_t * p_md, ...@@ -549,7 +549,7 @@ libvlc_media_get_duration( libvlc_media_t * p_md,
return -1; return -1;
} }
return input_item_GetDuration( p_md->p_input_item ); return input_item_GetDuration( p_md->p_input_item ) / 1000;
} }
/************************************************************************** /**************************************************************************
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment