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
da52c957
Commit
da52c957
authored
Dec 03, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix inverted RTP dropout and misordering, and some simplifications.
parent
2cdda809
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
12 deletions
+13
-12
modules/access/rtp/session.c
modules/access/rtp/session.c
+13
-12
No files found.
modules/access/rtp/session.c
View file @
da52c957
...
...
@@ -144,7 +144,7 @@ struct rtp_source_t
uint16_t
bad_seq
;
/* tentatively next expected sequence for resync */
uint16_t
max_seq
;
/* next expected sequence */
uint16_t
last_seq
;
/* sequence of the
las
t dequeued packet */
uint16_t
last_seq
;
/* sequence of the
nex
t dequeued packet */
block_t
*
blocks
;
/* re-ordered blocks queue */
void
*
opaque
[
0
];
/* Per-source private payload data */
};
...
...
@@ -319,35 +319,36 @@ rtp_queue (demux_t *demux, rtp_session_t *session, block_t *block)
/* Check sequence number */
/* NOTE: the sequence number is per-source,
* but is independent from the payload type. */
uint16_t
delta_seq
=
seq
-
(
src
->
max_seq
+
1
)
;
if
((
delta_seq
<
0x800
0
)
?
(
delta_seq
>
p_sys
->
max_dropout
)
:
((
65535
-
delta_seq
)
>
p_sys
->
max_misorder
))
int
delta_seq
=
seq
-
src
->
max_seq
;
if
((
delta_seq
>
0
)
?
(
delta_seq
>
p_sys
->
max_dropout
)
:
(
-
delta_seq
>
p_sys
->
max_misorder
))
{
msg_Dbg
(
demux
,
"sequence discontinuity
(got: %u, expected: %u)"
,
seq
,
(
src
->
max_seq
+
1
)
&
0xffff
);
if
(
seq
==
((
src
->
bad_seq
+
1
)
&
0xffff
)
)
msg_Dbg
(
demux
,
"sequence discontinuity
"
" (got: %"
PRIu16
", expected: %"
PRIu16
")"
,
seq
,
src
->
max_seq
);
if
(
seq
==
src
->
bad_seq
)
{
src
->
max_seq
=
src
->
bad_seq
=
seq
;
src
->
max_seq
=
src
->
bad_seq
=
seq
+
1
;
src
->
last_seq
=
seq
-
0x7fffe
;
/* hack for rtp_decode() */
msg_Warn
(
demux
,
"sequence resynchronized"
);
block_ChainRelease
(
src
->
blocks
);
src
->
blocks
=
NULL
;
}
else
{
src
->
bad_seq
=
seq
;
src
->
bad_seq
=
seq
+
1
;
goto
drop
;
}
}
else
if
(
delta_seq
<
0x800
0
)
src
->
max_seq
=
seq
;
if
(
delta_seq
>=
0
)
src
->
max_seq
=
seq
+
1
;
/* Queues the block in sequence order,
* hence there is a single queue for all payload types. */
block_t
**
pp
=
&
src
->
blocks
;
for
(
block_t
*
prev
=
*
pp
;
prev
!=
NULL
;
prev
=
*
pp
)
{
int
16_t
delta_seq
=
seq
-
rtp_seq
(
prev
);
int
delta_seq
=
seq
-
rtp_seq
(
prev
);
if
(
delta_seq
<
0
)
break
;
if
(
delta_seq
==
0
)
...
...
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