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
a1aaf849
Commit
a1aaf849
authored
May 09, 2005
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Encode URL if needed (should fix Debian bug #279735)
parent
74a5f722
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
4 deletions
+20
-4
modules/demux/livedotcom.cpp
modules/demux/livedotcom.cpp
+20
-4
No files found.
modules/demux/livedotcom.cpp
View file @
a1aaf849
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
#include <vlc/vlc.h>
#include <vlc/vlc.h>
#include <vlc/input.h>
#include <vlc/input.h>
#include "network.h"
#include <iostream>
#include <iostream>
...
@@ -132,6 +133,7 @@ typedef struct
...
@@ -132,6 +133,7 @@ typedef struct
struct
demux_sys_t
struct
demux_sys_t
{
{
char
*
p_sdp
;
/* XXX mallocated */
char
*
p_sdp
;
/* XXX mallocated */
char
*
psz_path
;
/* URL-encoded path */
MediaSession
*
ms
;
MediaSession
*
ms
;
TaskScheduler
*
scheduler
;
TaskScheduler
*
scheduler
;
...
@@ -226,6 +228,7 @@ static int Open ( vlc_object_t *p_this )
...
@@ -226,6 +228,7 @@ static int Open ( vlc_object_t *p_this )
p_sys
->
b_no_data
=
VLC_TRUE
;
p_sys
->
b_no_data
=
VLC_TRUE
;
p_sys
->
i_no_data_ti
=
0
;
p_sys
->
i_no_data_ti
=
0
;
p_sys
->
b_multicast
=
VLC_FALSE
;
p_sys
->
b_multicast
=
VLC_FALSE
;
p_sys
->
psz_path
=
p_demux
->
psz_path
;
if
(
(
p_sys
->
scheduler
=
BasicTaskScheduler
::
createNew
()
)
==
NULL
)
if
(
(
p_sys
->
scheduler
=
BasicTaskScheduler
::
createNew
()
)
==
NULL
)
...
@@ -239,6 +242,13 @@ static int Open ( vlc_object_t *p_this )
...
@@ -239,6 +242,13 @@ static int Open ( vlc_object_t *p_this )
goto
error
;
goto
error
;
}
}
if
(
vlc_UrlIsNotEncoded
(
p_sys
->
psz_path
)
)
{
p_sys
->
psz_path
=
vlc_UrlEncode
(
p_sys
->
psz_path
);
if
(
p_sys
->
psz_path
==
NULL
)
goto
error
;
}
if
(
p_demux
->
s
==
NULL
&&
!
strcasecmp
(
p_demux
->
psz_access
,
"rtsp"
)
)
if
(
p_demux
->
s
==
NULL
&&
!
strcasecmp
(
p_demux
->
psz_access
,
"rtsp"
)
)
{
{
char
*
psz_url
;
char
*
psz_url
;
...
@@ -251,8 +261,8 @@ static int Open ( vlc_object_t *p_this )
...
@@ -251,8 +261,8 @@ static int Open ( vlc_object_t *p_this )
p_sys
->
env
->
getResultMsg
()
);
p_sys
->
env
->
getResultMsg
()
);
goto
error
;
goto
error
;
}
}
psz_url
=
(
char
*
)
malloc
(
strlen
(
p_
demux
->
psz_path
)
+
8
);
psz_url
=
(
char
*
)
malloc
(
strlen
(
p_
sys
->
psz_path
)
+
8
);
sprintf
(
psz_url
,
"rtsp://%s"
,
p_
demux
->
psz_path
);
sprintf
(
psz_url
,
"rtsp://%s"
,
p_
sys
->
psz_path
);
psz_options
=
p_sys
->
rtsp
->
sendOptionsCmd
(
psz_url
);
psz_options
=
p_sys
->
rtsp
->
sendOptionsCmd
(
psz_url
);
if
(
psz_options
)
if
(
psz_options
)
...
@@ -276,7 +286,7 @@ static int Open ( vlc_object_t *p_this )
...
@@ -276,7 +286,7 @@ static int Open ( vlc_object_t *p_this )
}
}
else
if
(
p_demux
->
s
==
NULL
&&
!
strcasecmp
(
p_demux
->
psz_access
,
"sdp"
)
)
else
if
(
p_demux
->
s
==
NULL
&&
!
strcasecmp
(
p_demux
->
psz_access
,
"sdp"
)
)
{
{
p_sys
->
p_sdp
=
strdup
(
p_
demux
->
psz_path
);
p_sys
->
p_sdp
=
strdup
(
p_
sys
->
psz_path
);
}
}
else
else
{
{
...
@@ -626,6 +636,10 @@ error:
...
@@ -626,6 +636,10 @@ error:
{
{
free
(
p_sys
->
p_sdp
);
free
(
p_sys
->
p_sdp
);
}
}
if
(
(
p_sys
->
psz_path
!=
NULL
)
&&
(
p_sys
->
psz_path
!=
p_demux
->
psz_path
)
)
free
(
p_sys
->
psz_path
);
free
(
p_sys
);
free
(
p_sys
);
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
}
}
...
@@ -663,6 +677,8 @@ static void Close( vlc_object_t *p_this )
...
@@ -663,6 +677,8 @@ static void Close( vlc_object_t *p_this )
if
(
p_sys
->
env
)
RECLAIM_ENV
(
p_sys
->
env
);
if
(
p_sys
->
env
)
RECLAIM_ENV
(
p_sys
->
env
);
if
(
p_sys
->
scheduler
)
delete
p_sys
->
scheduler
;
if
(
p_sys
->
scheduler
)
delete
p_sys
->
scheduler
;
if
(
p_sys
->
p_sdp
)
free
(
p_sys
->
p_sdp
);
if
(
p_sys
->
p_sdp
)
free
(
p_sys
->
p_sdp
);
if
(
p_sys
->
psz_path
!=
p_demux
->
psz_path
)
free
(
p_sys
->
psz_path
);
free
(
p_sys
);
free
(
p_sys
);
}
}
...
@@ -955,7 +971,7 @@ static int RollOverTcp( demux_t *p_demux )
...
@@ -955,7 +971,7 @@ static int RollOverTcp( demux_t *p_demux )
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
}
}
asprintf
(
&
psz_url
,
"rtsp://%s"
,
p_
demux
->
psz_path
);
asprintf
(
&
psz_url
,
"rtsp://%s"
,
p_
sys
->
psz_path
);
if
(
(
psz_options
=
p_sys
->
rtsp
->
sendOptionsCmd
(
psz_url
)
)
)
if
(
(
psz_options
=
p_sys
->
rtsp
->
sendOptionsCmd
(
psz_url
)
)
)
delete
[]
psz_options
;
delete
[]
psz_options
;
...
...
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