[vlc-devel] [PATCH 2/3] lib: media: always fetch meta via the preparser

Thomas Guillem thomas at gllm.fr
Thu Aug 22 14:22:53 CEST 2019


libvlc_media_fetch_local = 0, this mean the preparser is always used, therefore
meta should be only fetched from the preparser.
---
 lib/media.c | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)

diff --git a/lib/media.c b/lib/media.c
index b190d0e268..a1c6d4e24a 100644
--- a/lib/media.c
+++ b/lib/media.c
@@ -793,21 +793,12 @@ static int media_parse(libvlc_media_t *media, bool b_async,
         input_item_meta_request_option_t parse_scope = META_REQUEST_OPTION_SCOPE_LOCAL;
         int ret;
 
-        /* Ignore libvlc_media_fetch_local flag since local art will be fetched
-         * by libvlc_MetadataRequest */
-        if (parse_flag & libvlc_media_fetch_network)
-        {
-            ret = libvlc_ArtRequest(libvlc, item,
-                                    META_REQUEST_OPTION_SCOPE_NETWORK,
-                                    NULL, NULL);
-            if (ret != VLC_SUCCESS)
-                return ret;
-        }
-
         if (parse_flag & libvlc_media_parse_network)
             parse_scope |= META_REQUEST_OPTION_SCOPE_NETWORK;
         if (parse_flag & libvlc_media_fetch_local)
             parse_scope |= META_REQUEST_OPTION_FETCH_LOCAL;
+        if (parse_flag & libvlc_media_fetch_network)
+            parse_scope |= META_REQUEST_OPTION_FETCH_NETWORK;
         if (parse_flag & libvlc_media_do_interact)
             parse_scope |= META_REQUEST_OPTION_DO_INTERACT;
 
-- 
2.20.1



More information about the vlc-devel mailing list