]> git.sesse.net Git - vlc/commitdiff
Have (and document) libvlc_media_get_duration return ms
authorOlivier Aubert <olivier.aubert@liris.cnrs.fr>
Tue, 4 Aug 2009 14:53:42 +0000 (16:53 +0200)
committerOlivier Aubert <olivier.aubert@liris.cnrs.fr>
Tue, 4 Aug 2009 15:17:07 +0000 (17:17 +0200)
in order to be consistent with other libvlc methods (libvlc_media_player_get_length, get_time, ...)

include/vlc/libvlc_media.h
src/control/media.c

index e21dca2c141d50859d268997a5373dc2dd4a05f1..3d1743f1ef515be774f84e673fdb014c56460ccf 100644 (file)
@@ -263,7 +263,7 @@ VLC_PUBLIC_API libvlc_event_manager_t *
                                            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_e an initialized exception object
index aaf6a37f55c496f9479cc20f5dec503e1ee02053..6f853f8e62a84d0ad4a33dc0e50b0332d010451e 100644 (file)
@@ -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
 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 input_item_GetDuration( p_md->p_input_item );
+    return input_item_GetDuration( p_md->p_input_item ) / 1000;
 }
 
 /**************************************************************************