[vlc-commits] [Git][videolan/vlc][master] 2 commits: VLCMediaSource: fix typo

Steve Lhomme (@robUx4) gitlab at videolan.org
Fri May 24 12:16:10 UTC 2024



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
b3c18144 by Alexandre Janniaux at 2024-05-24T11:38:25+00:00
VLCMediaSource: fix typo

- - - - -
d5de42f4 by Alexandre Janniaux at 2024-05-24T11:38:25+00:00
VLCMediaSource: check file:// for file browsing

An INPUT_TYPE_DIRECTORY might not match with an MRL supported by the
CoreFoundation API. The code handling the file browsing is made for
local file browsing at locations that are not exposed by services
discovery.

Ensure file:// is the scheme used for the MRL to trigger this browsing
code. This is not 100% compliant since it doesn't account for a demux
but there's probably no reason to have a demux there, and no occurrence
to that day.

This avoid bypassing the vlc_media_source/media_tree preparsing when the
source has been reported as INPUT_TYPE_DIRECTORY.

- - - - -


1 changed file:

- modules/gui/macosx/library/media-source/VLCMediaSource.m


Changes:

=====================================
modules/gui/macosx/library/media-source/VLCMediaSource.m
=====================================
@@ -249,7 +249,7 @@ static const char *const myFoldersDescription = "My Folders";
 - (void)preparseInputNodeWithinTree:(VLCInputNode *)inputNode
 {
     if(!inputNode) {
-        NSLog(@"Could not preparese input node, is null.");
+        NSLog(@"Could not preparse input node, is null.");
         return;
     }
 
@@ -261,7 +261,8 @@ static const char *const myFoldersDescription = "My Folders";
         return;
     }
 
-    if (inputNode.inputItem.inputType == ITEM_TYPE_DIRECTORY) {
+    if (inputNode.inputItem.inputType == ITEM_TYPE_DIRECTORY &&
+        [inputNode.inputItem.MRL hasPrefix:@"file://"]) {
         input_item_node_t *vlcInputNode = inputNode.vlcInputItemNode;
         NSURL *dirUrl = [NSURL URLWithString:inputNode.inputItem.MRL];
 



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/9f2c91e961658b08b882d6cf11a90b8b0c9ee331...d5de42f4810d33d39d89cf84ea2ecf6e6053111f

-- 
This project does not include diff previews in email notifications.
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/9f2c91e961658b08b882d6cf11a90b8b0c9ee331...d5de42f4810d33d39d89cf84ea2ecf6e6053111f
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list