Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sfu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
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
Alain Takoudjou
sfu
Commits
86f75946
Commit
86f75946
authored
4 years ago
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Discard old keyframes.
Avoids seqno wraparound. Unlikely, but I'm supersticious.
parent
0eb1593b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
packetcache/packetcache.go
packetcache/packetcache.go
+8
-0
No files found.
packetcache/packetcache.go
View file @
86f75946
...
...
@@ -137,6 +137,10 @@ func (frame *frame) store(seqno uint16, timestamp uint32, first bool, data []byt
}
}
else
if
len
(
frame
.
entries
)
>
0
{
if
frame
.
timestamp
!=
timestamp
{
delta
:=
seqno
-
frame
.
entries
[
0
]
.
seqno
if
(
delta
&
0x8000
)
==
0
&&
delta
>
0x4000
{
frame
.
entries
=
frame
.
entries
[
:
0
]
}
return
}
}
else
{
...
...
@@ -271,6 +275,10 @@ func (cache *Cache) Keyframe() (uint32, []uint16) {
cache
.
mu
.
Lock
()
defer
cache
.
mu
.
Unlock
()
if
len
(
cache
.
keyframe
.
entries
)
==
0
{
return
0
,
nil
}
seqnos
:=
make
([]
uint16
,
len
(
cache
.
keyframe
.
entries
))
for
i
:=
range
cache
.
keyframe
.
entries
{
seqnos
[
i
]
=
cache
.
keyframe
.
entries
[
i
]
.
seqno
...
...
This diff is collapsed.
Click to expand it.
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