[vlc-devel] [PATCH 6/6] libvlc: media: forward parse_associated_media option to preparser

Alexandre Janniaux ajanni at videolabs.io
Tue Dec 3 17:02:27 CET 2019


If the LibVLC client wants to preparse a media with associated elements
like slave, tell the preparser to do so through the correspond metadata
request option.
---
 lib/media.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/media.c b/lib/media.c
index f045c729d2..74707c41a7 100644
--- a/lib/media.c
+++ b/lib/media.c
@@ -800,6 +800,8 @@ static int media_parse(libvlc_media_t *media, bool b_async,
             parse_scope |= META_REQUEST_OPTION_FETCH_NETWORK;
         if (parse_flag & libvlc_media_do_interact)
             parse_scope |= META_REQUEST_OPTION_DO_INTERACT;
+        if (parse_flag & libvlc_media_parse_associated_media)
+            parse_scope |= META_REQUEST_OPTION_WITH_ASSOCIATED_MEDIA;
 
         ret = libvlc_MetadataRequest(libvlc, item, parse_scope,
                                      &input_preparser_callbacks, media,
-- 
2.24.0



More information about the vlc-devel mailing list