Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
a04e8454
Commit
a04e8454
authored
Mar 15, 2012
by
Sébastien Escudier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sap : smooth the announce period average
closes #5462
parent
be3ffe18
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
modules/services_discovery/sap.c
modules/services_discovery/sap.c
+1
-1
No files found.
modules/services_discovery/sap.c
View file @
a04e8454
...
@@ -811,7 +811,7 @@ static int ParseSAP( services_discovery_t *p_sd, const uint8_t *buf,
...
@@ -811,7 +811,7 @@ static int ParseSAP( services_discovery_t *p_sd, const uint8_t *buf,
/* Compute the average period */
/* Compute the average period */
mtime_t
now
=
mdate
();
mtime_t
now
=
mdate
();
p_announce
->
i_period
=
(
p_announce
->
i_period
+
(
now
-
p_announce
->
i_last
))
/
2
;
p_announce
->
i_period
=
(
p_announce
->
i_period
*
(
p_announce
->
i_period_trust
-
1
)
+
(
now
-
p_announce
->
i_last
)
)
/
p_announce
->
i_period_trust
;
p_announce
->
i_last
=
now
;
p_announce
->
i_last
=
now
;
}
}
FreeSDP
(
p_sdp
);
p_sdp
=
NULL
;
FreeSDP
(
p_sdp
);
p_sdp
=
NULL
;
...
...
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