[vlc-commits] Document preparsing need

Olivier Aubert git at videolan.org
Sun Mar 31 16:42:12 CEST 2019


vlc | branch: master | Olivier Aubert <contact at olivieraubert.net> | Sun Mar 31 16:41:56 2019 +0200| [8c608cc5751bce4488284f7e64e2e1ba9a2e0ab1] | committer: Olivier Aubert

Document preparsing need

Duplicate the note about the necessity to call libvlc_media_parse from
media_tracks_get for other functions that also need pre-parsing:
media_get_duration, media_get_meta, media_get_codec_description

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8c608cc5751bce4488284f7e64e2e1ba9a2e0ab1
---

 include/vlc/libvlc_media.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/include/vlc/libvlc_media.h b/include/vlc/libvlc_media.h
index 5ddf84a69d..bb47738920 100644
--- a/include/vlc/libvlc_media.h
+++ b/include/vlc/libvlc_media.h
@@ -563,6 +563,8 @@ LIBVLC_API libvlc_media_t *libvlc_media_duplicate( libvlc_media_t *p_md );
 /**
  * Read the meta of the media.
  *
+ * Note, you need to call libvlc_media_parse() or play the media at least once
+ * before calling this function.
  * If the media has not yet been parsed this will return NULL.
  *
  * \see libvlc_media_parse
@@ -651,6 +653,10 @@ LIBVLC_API libvlc_event_manager_t *
 /**
  * Get duration (in ms) of media descriptor object item.
  *
+ * Note, you need to call libvlc_media_parse() or play the media at least once
+ * before calling this function.
+ * Not doing this will result in an undefined result.
+ *
  * \param p_md media descriptor object
  * \return duration of media item or -1 on error
  */
@@ -762,6 +768,9 @@ unsigned libvlc_media_tracks_get( libvlc_media_t *p_md,
 /**
  * Get codec description from media elementary stream
  *
+ * Note, you need to call libvlc_media_parse() or play the media at least once
+ * before calling this function.
+ *
  * \version LibVLC 3.0.0 and later.
  *
  * \see libvlc_media_track_t



More information about the vlc-commits mailing list