Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
58469fda
Commit
58469fda
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
parent
7913df22
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 @
58469fda
...
@@ -285,6 +285,22 @@ static inline int min_int( int a, int b )
...
@@ -285,6 +285,22 @@ static inline int min_int( int a, int b )
return
a
>
b
?
b
:
a
;
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
* Open: initialize and create stuff
*****************************************************************************/
*****************************************************************************/
...
@@ -391,19 +407,8 @@ static int OpenDemux( vlc_object_t *p_this )
...
@@ -391,19 +407,8 @@ static int OpenDemux( vlc_object_t *p_this )
{
{
p_sdp
->
psz_uri
=
NULL
;
p_sdp
->
psz_uri
=
NULL
;
}
}
switch
(
p_sdp
->
i_media_type
)
if
(
!
IsWellKnownPayload
(
p_sdp
->
i_media_type
))
{
/* Should be in sync with modules/demux/rtp.c */
goto
error
;
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
(
p_sdp
->
psz_uri
==
NULL
)
goto
error
;
if
(
p_sdp
->
psz_uri
==
NULL
)
goto
error
;
p_demux
->
p_sys
=
(
demux_sys_t
*
)
malloc
(
sizeof
(
demux_sys_t
)
);
p_demux
->
p_sys
=
(
demux_sys_t
*
)
malloc
(
sizeof
(
demux_sys_t
)
);
...
@@ -789,10 +794,7 @@ static int ParseSAP( services_discovery_t *p_sd, const uint8_t *buf,
...
@@ -789,10 +794,7 @@ static int ParseSAP( services_discovery_t *p_sd, const uint8_t *buf,
p_sdp
->
psz_uri
=
NULL
;
p_sdp
->
psz_uri
=
NULL
;
/* Multi-media or no-parse -> pass to LIVE.COM */
/* Multi-media or no-parse -> pass to LIVE.COM */
if
(
(
p_sdp
->
i_media_type
!=
14
if
(
!
IsWellKnownPayload
(
p_sdp
->
i_media_type
)
||
!
p_sd
->
p_sys
->
b_parse
)
&&
p_sdp
->
i_media_type
!=
32
&&
p_sdp
->
i_media_type
!=
33
)
||
p_sd
->
p_sys
->
b_parse
==
false
)
{
{
free
(
p_sdp
->
psz_uri
);
free
(
p_sdp
->
psz_uri
);
if
(
asprintf
(
&
p_sdp
->
psz_uri
,
"sdp://%s"
,
p_sdp
->
psz_sdp
)
==
-
1
)
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