[vlc-devel] [PATCH 13/21] input/input: stream-fragments: do not remove anchor data in input_SplitMRL

Filip Roséen filip at atch.se
Sun Jul 31 22:42:22 CEST 2016


Given that the stream-fragment data are stored in the anchor part of
an MRL, we sure should not strip it (as it is now part of the
resource location we are trying to open).
---
 src/input/input.c          | 15 ++-------------
 src/input/input_internal.h |  3 +--
 2 files changed, 3 insertions(+), 15 deletions(-)

diff --git a/src/input/input.c b/src/input/input.c
index 721acb3..e8a6844 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -2220,7 +2220,7 @@ static input_source_t *InputSourceNew( input_thread_t *p_input,
     }
 
     /* Split uri */
-    input_SplitMRL( &psz_access, &psz_demux, &psz_path, &psz_anchor, psz_dup );
+    input_SplitMRL( &psz_access, &psz_demux, &psz_path, psz_dup );
 
     if( psz_forced_demux != NULL )
         psz_demux = psz_forced_demux;
@@ -2777,7 +2777,7 @@ static void input_ChangeState( input_thread_t *p_input, int i_state )
  *           Media Resource Locator.
  *****************************************************************************/
 void input_SplitMRL( const char **access, const char **demux,
-                     const char **path, const char **anchor, char *buf )
+                     const char **path, char *buf )
 {
     char *p;
 
@@ -2788,17 +2788,6 @@ void input_SplitMRL( const char **access, const char **demux,
         *p = '\0';
         p += 3; /* skips "://" */
         *path = p;
-
-        /* Remove HTML anchor if present (not supported).
-         * The hash symbol itself should be URI-encoded. */
-        p = strchr( p, '#' );
-        if( p != NULL )
-        {
-            *(p++) = '\0';
-            *anchor = p;
-        }
-        else
-            *anchor = "";
     }
     else
     {
diff --git a/src/input/input_internal.h b/src/input/input_internal.h
index e3a5de0..d3efe8b 100644
--- a/src/input/input_internal.h
+++ b/src/input/input_internal.h
@@ -253,8 +253,7 @@ int subtitles_Detect( input_thread_t *, char *, const char *, input_item_slave_t
 int subtitles_Filter( const char *);
 
 /* input.c */
-void input_SplitMRL( const char **, const char **, const char **,
-                     const char **, char * );
+void input_SplitMRL( const char **, const char **, const char **, char * );
 
 /* meta.c */
 void vlc_audio_replay_gain_MergeFromMeta( audio_replay_gain_t *p_dst,
-- 
2.9.2



More information about the vlc-devel mailing list