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
0e4d3263
Commit
0e4d3263
authored
Dec 13, 2007
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't substract twelve twice
parent
14fae49c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
modules/stream_out/rtpfmt.c
modules/stream_out/rtpfmt.c
+11
-11
No files found.
modules/stream_out/rtpfmt.c
View file @
0e4d3263
...
...
@@ -31,7 +31,7 @@
int
rtp_packetize_mpa
(
sout_stream_t
*
p_stream
,
sout_stream_id_t
*
id
,
block_t
*
in
)
{
int
i_max
=
rtp_mtu
(
id
)
-
12
-
4
;
/* payload max in one packet */
int
i_max
=
rtp_mtu
(
id
)
-
4
;
/* payload max in one packet */
int
i_count
=
(
in
->
i_buffer
+
i_max
-
1
)
/
i_max
;
uint8_t
*
p_data
=
in
->
p_buffer
;
...
...
@@ -70,7 +70,7 @@ int rtp_packetize_mpa( sout_stream_t *p_stream, sout_stream_id_t *id,
int
rtp_packetize_mpv
(
sout_stream_t
*
p_stream
,
sout_stream_id_t
*
id
,
block_t
*
in
)
{
int
i_max
=
rtp_mtu
(
id
)
-
12
-
4
;
/* payload max in one packet */
int
i_max
=
rtp_mtu
(
id
)
-
4
;
/* payload max in one packet */
int
i_count
=
(
in
->
i_buffer
+
i_max
-
1
)
/
i_max
;
uint8_t
*
p_data
=
in
->
p_buffer
;
...
...
@@ -173,7 +173,7 @@ int rtp_packetize_mpv( sout_stream_t *p_stream, sout_stream_id_t *id,
int
rtp_packetize_ac3
(
sout_stream_t
*
p_stream
,
sout_stream_id_t
*
id
,
block_t
*
in
)
{
int
i_max
=
rtp_mtu
(
id
)
-
12
-
2
;
/* payload max in one packet */
int
i_max
=
rtp_mtu
(
id
)
-
2
;
/* payload max in one packet */
int
i_count
=
(
in
->
i_buffer
+
i_max
-
1
)
/
i_max
;
uint8_t
*
p_data
=
in
->
p_buffer
;
...
...
@@ -210,7 +210,7 @@ int rtp_packetize_ac3( sout_stream_t *p_stream, sout_stream_id_t *id,
int
rtp_packetize_split
(
sout_stream_t
*
p_stream
,
sout_stream_id_t
*
id
,
block_t
*
in
)
{
int
i_max
=
rtp_mtu
(
id
)
-
12
;
/* payload max in one packet */
int
i_max
=
rtp_mtu
(
id
);
/* payload max in one packet */
int
i_count
=
(
in
->
i_buffer
+
i_max
-
1
)
/
i_max
;
uint8_t
*
p_data
=
in
->
p_buffer
;
...
...
@@ -244,7 +244,7 @@ int rtp_packetize_split( sout_stream_t *p_stream, sout_stream_id_t *id,
int
rtp_packetize_mp4a_latm
(
sout_stream_t
*
p_stream
,
sout_stream_id_t
*
id
,
block_t
*
in
)
{
int
i_max
=
rtp_mtu
(
id
)
-
14
;
/* payload max in one packet */
int
i_max
=
rtp_mtu
(
id
)
-
2
;
/* payload max in one packet */
int
latmhdrsize
=
in
->
i_buffer
/
0xff
+
1
;
int
i_count
=
(
in
->
i_buffer
+
i_max
-
1
)
/
i_max
;
...
...
@@ -357,7 +357,7 @@ int rtp_packetize_l8( sout_stream_t *p_stream, sout_stream_id_t *id,
int
rtp_packetize_mp4a
(
sout_stream_t
*
p_stream
,
sout_stream_id_t
*
id
,
block_t
*
in
)
{
int
i_max
=
rtp_mtu
(
id
)
-
16
;
/* payload max in one packet */
int
i_max
=
rtp_mtu
(
id
)
-
4
;
/* payload max in one packet */
int
i_count
=
(
in
->
i_buffer
+
i_max
-
1
)
/
i_max
;
uint8_t
*
p_data
=
in
->
p_buffer
;
...
...
@@ -405,7 +405,7 @@ int rtp_packetize_h263( sout_stream_t *p_stream, sout_stream_id_t *id,
uint8_t
*
p_data
=
in
->
p_buffer
;
int
i_data
=
in
->
i_buffer
;
int
i
;
int
i_max
=
rtp_mtu
(
id
)
-
12
-
RTP_H263_HEADER_SIZE
;
/* payload max in one packet */
int
i_max
=
rtp_mtu
(
id
)
-
RTP_H263_HEADER_SIZE
;
/* payload max in one packet */
int
i_count
;
int
b_p_bit
;
int
b_v_bit
=
0
;
// no pesky error resilience
...
...
@@ -466,7 +466,7 @@ rtp_packetize_h264_nal( sout_stream_t *p_stream, sout_stream_id_t *id,
const
uint8_t
*
p_data
,
int
i_data
,
int64_t
i_pts
,
int64_t
i_dts
,
vlc_bool_t
b_last
,
int64_t
i_length
)
{
const
int
i_max
=
rtp_mtu
(
id
)
-
12
;
/* payload max in one packet */
const
int
i_max
=
rtp_mtu
(
id
);
/* payload max in one packet */
int
i_nal_hdr
;
int
i_nal_type
;
...
...
@@ -575,7 +575,7 @@ int rtp_packetize_h264( sout_stream_t *p_stream, sout_stream_id_t *id,
int
rtp_packetize_amr
(
sout_stream_t
*
p_stream
,
sout_stream_id_t
*
id
,
block_t
*
in
)
{
int
i_max
=
rtp_mtu
(
id
)
-
14
;
/* payload max in one packet */
int
i_max
=
rtp_mtu
(
id
)
-
2
;
/* payload max in one packet */
int
i_count
=
(
in
->
i_buffer
+
i_max
-
1
)
/
i_max
;
uint8_t
*
p_data
=
in
->
p_buffer
;
...
...
@@ -614,7 +614,7 @@ int rtp_packetize_amr( sout_stream_t *p_stream, sout_stream_id_t *id,
int
rtp_packetize_t140
(
sout_stream_t
*
p_stream
,
sout_stream_id_t
*
id
,
block_t
*
in
)
{
const
size_t
i_max
=
rtp_mtu
(
id
)
-
12
;
const
size_t
i_max
=
rtp_mtu
(
id
);
const
uint8_t
*
p_data
=
in
->
p_buffer
;
size_t
i_data
=
in
->
i_buffer
;
...
...
@@ -667,7 +667,7 @@ int rtp_packetize_spx( sout_stream_t *p_stream, sout_stream_id_t *id,
i_payload_padding
=
0
;
block_t
*
p_out
;
if
(
in
->
i_buffer
+
12
>
rtp_mtu
(
id
)
)
if
(
in
->
i_buffer
>
rtp_mtu
(
id
)
)
{
msg_Warn
(
p_stream
,
"Cannot send packet larger than output MTU"
);
return
VLC_SUCCESS
;
...
...
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