Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
474d6a5a
Commit
474d6a5a
authored
Nov 03, 2006
by
Sigmund Augdal Helberg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
access_output/udp.c: Don't crash horribly when trying to send a packet
larger than the mtu in rtp mode
parent
01cca2b2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
modules/access_output/udp.c
modules/access_output/udp.c
+7
-2
No files found.
modules/access_output/udp.c
View file @
474d6a5a
...
...
@@ -167,6 +167,7 @@ struct sout_access_out_sys_t
};
#define DEFAULT_PORT 1234
#define RTP_HEADER_LENGTH 12
/*****************************************************************************
* Open: open the file
...
...
@@ -369,7 +370,11 @@ static int Write( sout_access_out_t *p_access, block_t *p_buffer )
while
(
p_buffer
->
i_buffer
)
{
int
i_write
=
__MIN
(
p_buffer
->
i_buffer
,
p_sys
->
i_mtu
);
int
i_payload_size
=
p_sys
->
i_mtu
;
if
(
p_sys
->
b_rtpts
)
i_payload_size
-=
RTP_HEADER_LENGTH
;
int
i_write
=
__MIN
(
p_buffer
->
i_buffer
,
i_payload_size
);
i_packets
++
;
...
...
@@ -493,7 +498,7 @@ static block_t *NewUDPPacket( sout_access_out_t *p_access, mtime_t i_dts)
p_buffer
->
p_buffer
[
10
]
=
(
p_sys
->
i_ssrc
>>
8
)
&
0xff
;
p_buffer
->
p_buffer
[
11
]
=
p_sys
->
i_ssrc
&
0xff
;
p_buffer
->
i_buffer
=
12
;
p_buffer
->
i_buffer
=
RTP_HEADER_LENGTH
;
}
return
p_buffer
;
...
...
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