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
be0a4188
Commit
be0a4188
authored
Jun 07, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
RTP: ignore muxed RTCP packets for the time being
parent
ce5b2bb7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
75 additions
and
73 deletions
+75
-73
modules/demux/rtp.c
modules/demux/rtp.c
+75
-73
No files found.
modules/demux/rtp.c
View file @
be0a4188
...
@@ -469,83 +469,85 @@ static int Demux (demux_t *demux)
...
@@ -469,83 +469,85 @@ static int Demux (demux_t *demux)
block_t
*
block
;
block_t
*
block
;
block
=
rtp_dgram_recv
(
demux
,
p_sys
->
fd
);
block
=
rtp_dgram_recv
(
demux
,
p_sys
->
fd
);
if
(
block
)
if
(
!
block
)
return
1
;
if
(
block
->
i_buffer
<
2
)
goto
drop
;
const
uint8_t
ptype
=
block
->
p_buffer
[
1
]
&
0x7F
;
if
(
ptype
>=
72
&&
ptype
<=
76
)
goto
drop
;
/* Muxed RTCP, ignore for now */
/* Not using SDP, we need to guess the payload format used */
/* see http://www.iana.org/assignments/rtp-parameters */
if
(
p_sys
->
autodetect
)
{
{
/* Not using SDP, we need to guess the payload format used */
rtp_pt_t
pt
=
{
/* see http://www.iana.org/assignments/rtp-parameters */
.
init
=
NULL
,
if
(
p_sys
->
autodetect
&&
block
->
i_buffer
>=
2
)
.
destroy
=
codec_destroy
,
.
decode
=
codec_decode
,
.
frequency
=
0
,
.
number
=
ptype
,
};
switch
(
ptype
)
{
{
rtp_pt_t
pt
=
{
case
0
:
.
init
=
NULL
,
msg_Dbg
(
demux
,
"detected G.711 mu-law"
);
.
destroy
=
codec_destroy
,
pt
.
init
=
pcmu_init
;
.
decode
=
codec_decode
,
pt
.
frequency
=
8000
;
.
frequency
=
0
,
break
;
.
number
=
block
->
p_buffer
[
1
]
&
0x7f
,
};
case
8
:
msg_Dbg
(
demux
,
"detected G.711 A-law"
);
switch
(
pt
.
number
)
pt
.
init
=
pcma_init
;
{
pt
.
frequency
=
8000
;
case
0
:
break
;
msg_Dbg
(
demux
,
"detected G.711 mu-law"
);
pt
.
init
=
pcmu_init
;
case
10
:
pt
.
frequency
=
8000
;
msg_Dbg
(
demux
,
"detected stereo PCM"
);
break
;
pt
.
init
=
l16s_init
;
pt
.
frequency
=
44100
;
case
8
:
break
;
msg_Dbg
(
demux
,
"detected G.711 A-law"
);
pt
.
init
=
pcma_init
;
case
11
:
pt
.
frequency
=
8000
;
msg_Dbg
(
demux
,
"detected mono PCM"
);
break
;
pt
.
init
=
l16m_init
;
pt
.
frequency
=
44100
;
case
10
:
break
;
msg_Dbg
(
demux
,
"detected stereo PCM"
);
pt
.
init
=
l16s_init
;
case
14
:
pt
.
frequency
=
44100
;
msg_Dbg
(
demux
,
"detected MPEG Audio"
);
break
;
pt
.
init
=
mpa_init
;
pt
.
decode
=
mpa_decode
;
case
11
:
pt
.
frequency
=
44100
;
msg_Dbg
(
demux
,
"detected mono PCM"
);
break
;
pt
.
init
=
l16m_init
;
pt
.
frequency
=
44100
;
case
32
:
break
;
msg_Dbg
(
demux
,
"detected MPEG Video"
);
pt
.
init
=
mpv_init
;
case
14
:
pt
.
decode
=
mpv_decode
;
msg_Dbg
(
demux
,
"detected MPEG Audio"
);
pt
.
frequency
=
90000
;
pt
.
init
=
mpa_init
;
break
;
pt
.
decode
=
mpa_decode
;
pt
.
frequency
=
44100
;
case
33
:
break
;
msg_Dbg
(
demux
,
"detected MPEG2 TS"
);
pt
.
init
=
ts_init
;
case
32
:
pt
.
destroy
=
stream_destroy
;
msg_Dbg
(
demux
,
"detected MPEG Video"
);
pt
.
decode
=
stream_decode
;
pt
.
init
=
mpv_init
;
pt
.
frequency
=
90000
;
pt
.
decode
=
mpv_decode
;
break
;
pt
.
frequency
=
90000
;
break
;
default:
goto
drop
;
case
33
:
msg_Dbg
(
demux
,
"detected MPEG2 TS"
);
pt
.
init
=
ts_init
;
pt
.
destroy
=
stream_destroy
;
pt
.
decode
=
stream_decode
;
pt
.
frequency
=
90000
;
break
;
case
72
:
/* muxed SR */
case
73
:
/* muxed RR */
case
74
:
/* muxed SDES */
case
75
:
/* muxed BYE */
case
76
:
/* muxed APP */
default:
block_Release
(
block
);
/* ooh! ignoring RTCP is evil! */
return
1
;
}
rtp_add_type
(
demux
,
p_sys
->
session
,
&
pt
);
p_sys
->
autodetect
=
false
;
}
}
rtp_add_type
(
demux
,
p_sys
->
session
,
&
pt
);
rtp_receive
(
demux
,
p_sys
->
session
,
block
)
;
p_sys
->
autodetect
=
false
;
}
}
rtp_receive
(
demux
,
p_sys
->
session
,
block
);
return
1
;
drop:
block_Release
(
block
);
return
1
;
return
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