[vlc-commits] [Git][videolan/vlc][3.0.x] 2 commits: input: always set the anchor in input_SplitMRL() calls

Steve Lhomme (@robUx4) gitlab at videolan.org
Tue Sep 29 05:31:00 UTC 2026



Steve Lhomme pushed to branch 3.0.x at VideoLAN / VLC


Commits:
b92fdec5 by Steve Lhomme at 2026-09-29T05:06:45+00:00
input: always set the anchor in input_SplitMRL() calls

In some cases it might have remained at NULL which is not supported by
mrl_FragmentSplit() via InputStreamHandleAnchor().

Fixes #30168

(cherry picked from commit b11917943e3a32578d65edd54f3d12023da29d46)
Signed-off-by: Steve Lhomme <robux4 at ycbcr.xyz>

- - - - -
84177b22 by Rémi Denis-Courmont at 2026-09-29T05:06:45+00:00
input: make input_SplitMRL() static

(cherry picked from commit d6dd3a48ac35f86883db4a3a86161381db6ae7f1)
Signed-off-by: Steve Lhomme <robux4 at ycbcr.xyz>

- - - - -


2 changed files:

- src/input/input.c
- src/input/input_internal.h


Changes:

=====================================
src/input/input.c
=====================================
@@ -2658,6 +2658,9 @@ error:
     return NULL;
 }
 
+static void input_SplitMRL( const char **, const char **, const char **,
+                            const char **, char * );
+
 /*****************************************************************************
  * InputSourceNew:
  *****************************************************************************/
@@ -2672,7 +2675,7 @@ static input_source_t *InputSourceNew( input_thread_t *p_input,
     if( unlikely(in == NULL) )
         return NULL;
 
-    const char *psz_access, *psz_demux, *psz_path, *psz_anchor = NULL;
+    const char *psz_access, *psz_demux, *psz_path, *psz_anchor;
 
     assert( psz_mrl );
     char *psz_dup = strdup( psz_mrl );
@@ -3271,10 +3274,11 @@ static void input_ChangeState( input_thread_t *p_input, int i_state )
  * MRLSplit: parse the access, demux and url part of the
  *           Media Resource Locator.
  *****************************************************************************/
-void input_SplitMRL( const char **access, const char **demux,
-                     const char **path, const char **anchor, char *buf )
+static void input_SplitMRL( const char **access, const char **demux,
+                            const char **path, const char **anchor, char *buf )
 {
     char *p;
+    *anchor = "";
 
     /* Separate <path> from <access>[/<demux>]:// */
     p = strstr( buf, "://" );
@@ -3292,8 +3296,6 @@ void input_SplitMRL( const char **access, const char **demux,
             *(p++) = '\0';
             *anchor = p;
         }
-        else
-            *anchor = "";
     }
     else
     {


=====================================
src/input/input_internal.h
=====================================
@@ -271,10 +271,6 @@ void input_ConfigVarInit ( input_thread_t * );
 int subtitles_Detect( input_thread_t *, char *, const char *, input_item_slave_t ***, int * );
 int subtitles_Filter( const char *);
 
-/* input.c */
-void input_SplitMRL( const char **, const char **, const char **,
-                     const char **, char * );
-
 /* meta.c */
 void vlc_audio_replay_gain_MergeFromMeta( audio_replay_gain_t *p_dst,
                                           const vlc_meta_t *p_meta );



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/d7e8e0d07f75b489e49cb4d1c8bf4ca5fa779796...84177b2273abc5c4300234e6e18b55a4d2dd5a03

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/d7e8e0d07f75b489e49cb4d1c8bf4ca5fa779796...84177b2273abc5c4300234e6e18b55a4d2dd5a03
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help




More information about the vlc-commits mailing list