From a4debd38e8259e150e6a8c9347b8d5da2d065546 Mon Sep 17 00:00:00 2001
From: Maxime Chapelet <umxprime@videolabs.io>
Date: Mon, 20 Jan 2025 10:56:46 +0100
Subject: [PATCH] libvlc: fix network media parsing

Calls to `libvlc_media_parse_request` with smb server URL never succeeded
because `do_parse` var was always `false` when `input_net` var was `true`
and `libvlc_media_parse_network` flag was set.

This change fixes this problem and bring back the ability to parse network
files when the `libvlc_media_parse_network` flag is set
---
 lib/media.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/media.c b/lib/media.c
index 01520515554c..f417e3a3bfc5 100644
--- a/lib/media.c
+++ b/lib/media.c
@@ -764,8 +764,8 @@ int libvlc_media_parse_request(libvlc_instance_t *inst, libvlc_media_t *media,
         do_parse = true;
     else
     {
-        if (input_net && (parse_flag & libvlc_media_parse_network) == 0)
-            do_parse = false;
+        if (input_net)
+            do_parse = parse_flag & libvlc_media_parse_network;
         else if (parse_flag & libvlc_media_parse_local)
         {
             switch (input_type)
-- 
GitLab