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
012818b0
Commit
012818b0
authored
Feb 28, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Recognize supported media type for SDP from SAP, not only from files
(cherry picked from commit
58469fda
)
parent
0fe3057f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
17 deletions
+19
-17
modules/services_discovery/sap.c
modules/services_discovery/sap.c
+19
-17
No files found.
modules/services_discovery/sap.c
View file @
012818b0
...
...
@@ -287,6 +287,22 @@ static inline int min_int( int a, int b )
return
a
>
b
?
b
:
a
;
}
static
bool
IsWellKnownPayload
(
int
type
)
{
switch
(
type
)
{
/* Should be in sync with modules/demux/rtp.c */
case
0
:
/* PCMU/8000 */
case
8
:
/* PCMA/8000 */
case
10
:
/* L16/44100/2 */
case
11
:
/* L16/44100 */
case
14
:
/* MPA/90000 */
case
32
:
/* MPV/90000 */
case
33
:
/* MP2/90000 */
return
true
;
}
return
false
;
}
/*****************************************************************************
* Open: initialize and create stuff
*****************************************************************************/
...
...
@@ -394,19 +410,8 @@ static int OpenDemux( vlc_object_t *p_this )
{
p_sdp
->
psz_uri
=
NULL
;
}
switch
(
p_sdp
->
i_media_type
)
{
/* Should be in sync with modules/demux/rtp.c */
case
0
:
/* PCMU/8000 */
case
8
:
/* PCMA/8000 */
case
10
:
/* L16/44100/2 */
case
11
:
/* L16/44100 */
case
14
:
/* MPA/90000 */
case
32
:
/* MPV/90000 */
case
33
:
/* MP2/90000 */
break
;
default:
goto
error
;
}
if
(
!
IsWellKnownPayload
(
p_sdp
->
i_media_type
))
goto
error
;
if
(
p_sdp
->
psz_uri
==
NULL
)
goto
error
;
p_demux
->
p_sys
=
(
demux_sys_t
*
)
malloc
(
sizeof
(
demux_sys_t
)
);
...
...
@@ -780,10 +785,7 @@ static int ParseSAP( services_discovery_t *p_sd, const uint8_t *buf,
p_sdp
->
psz_uri
=
NULL
;
/* Multi-media or no-parse -> pass to LIVE.COM */
if
(
(
p_sdp
->
i_media_type
!=
14
&&
p_sdp
->
i_media_type
!=
32
&&
p_sdp
->
i_media_type
!=
33
)
||
p_sd
->
p_sys
->
b_parse
==
false
)
if
(
!
IsWellKnownPayload
(
p_sdp
->
i_media_type
)
||
!
p_sd
->
p_sys
->
b_parse
)
{
free
(
p_sdp
->
psz_uri
);
if
(
asprintf
(
&
p_sdp
->
psz_uri
,
"sdp://%s"
,
p_sdp
->
psz_sdp
)
==
-
1
)
...
...
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