Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
c1b3c201
Commit
c1b3c201
authored
Jul 30, 2014
by
Antti Ajanki
Committed by
Tristan Matthews
Jul 31, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hds: Base URL should not include a possible query
parent
ae192018
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
modules/stream_filter/hds/hds.c
modules/stream_filter/hds/hds.c
+9
-4
No files found.
modules/stream_filter/hds/hds.c
View file @
c1b3c201
...
...
@@ -24,6 +24,8 @@
# include "config.h"
#endif
#include <limits.h>
/* INT_MAX */
#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_stream.h>
...
...
@@ -1411,17 +1413,20 @@ static int Open( vlc_object_t *p_this )
if
(
unlikely
(
p_sys
==
NULL
)
)
return
VLC_ENOMEM
;
char
*
uri
=
NULL
;
if
(
unlikely
(
asprintf
(
&
uri
,
"%s://%s"
,
s
->
psz_access
,
s
->
psz_path
)
<
0
)
)
char
*
uri_without_query
=
NULL
;
size_t
pathlen
=
strcspn
(
s
->
psz_path
,
"?"
);
if
(
unlikely
(
(
pathlen
>
INT_MAX
)
||
(
asprintf
(
&
uri_without_query
,
"%s://%.*s"
,
s
->
psz_access
,
(
int
)
pathlen
,
s
->
psz_path
)
<
0
)
)
)
{
free
(
p_sys
);
return
VLC_ENOMEM
;
}
/* remove the last part of the url */
char
*
pos
=
strrchr
(
uri
,
'/'
);
char
*
pos
=
strrchr
(
uri
_without_query
,
'/'
);
*
pos
=
'\0'
;
p_sys
->
base_url
=
uri
;
p_sys
->
base_url
=
uri
_without_query
;
p_sys
->
flv_header_bytes_sent
=
0
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment