[vlc-commits] lib/media: don't request local art twice

Thomas Guillem git at videolan.org
Thu Oct 5 11:20:11 CEST 2017


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Oct  5 10:35:47 2017 +0200| [9264da8448b1451d5ea773fa01af99fc736a5320] | committer: Thomas Guillem

lib/media: don't request local art twice

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

 lib/media.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/lib/media.c b/lib/media.c
index 30e5bd55f4..8da5a130e2 100644
--- a/lib/media.c
+++ b/lib/media.c
@@ -774,16 +774,15 @@ static int media_parse(libvlc_media_t *media, bool b_async,
     {
         libvlc_int_t *libvlc = media->p_libvlc_instance->p_libvlc_int;
         input_item_t *item = media->p_input_item;
-        input_item_meta_request_option_t art_scope = META_REQUEST_OPTION_NONE;
         input_item_meta_request_option_t parse_scope = META_REQUEST_OPTION_SCOPE_LOCAL;
         int ret;
 
-        if (parse_flag & libvlc_media_fetch_local)
-            art_scope |= META_REQUEST_OPTION_SCOPE_LOCAL;
+        /* Ignore libvlc_media_fetch_local flag since local art will be fetched
+         * by libvlc_MetadataRequest */
         if (parse_flag & libvlc_media_fetch_network)
-            art_scope |= META_REQUEST_OPTION_SCOPE_NETWORK;
-        if (art_scope != META_REQUEST_OPTION_NONE) {
-            ret = libvlc_ArtRequest(libvlc, item, art_scope);
+        {
+            ret = libvlc_ArtRequest(libvlc, item,
+                                    META_REQUEST_OPTION_SCOPE_NETWORK);
             if (ret != VLC_SUCCESS)
                 return ret;
         }



More information about the vlc-commits mailing list