[vlc-devel] [PATCH v2 5/5] libvlc: media: set WITH_ASSOCIATED_MEDIA option to preparser

Alexandre Janniaux ajanni at videolabs.io
Fri Feb 7 22:04:49 CET 2020


When a LibVLC client associates multiple inputs to a media through the
input slave mechanism, it should expect that all associated media get
preparsed so that listing tracks and elementary stream ids give
a comprehensive result.

To achieve this, always set the WITH_ASSOCIATED_MEDIA when requesting
a preparsing from the LibVLC API.
---
 lib/media.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/media.c b/lib/media.c
index f045c729d2..bd40fc388a 100644
--- a/lib/media.c
+++ b/lib/media.c
@@ -801,6 +801,9 @@ static int media_parse(libvlc_media_t *media, bool b_async,
         if (parse_flag & libvlc_media_do_interact)
             parse_scope |= META_REQUEST_OPTION_DO_INTERACT;
 
+        /* Always preparse associated media when using libvlc. */
+        parse_scope |= META_REQUEST_OPTION_WITH_ASSOCIATED_MEDIA;
+
         ret = libvlc_MetadataRequest(libvlc, item, parse_scope,
                                      &input_preparser_callbacks, media,
                                      timeout, media);
-- 
2.25.0



More information about the vlc-devel mailing list