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
ee8c9ec3
Commit
ee8c9ec3
authored
Dec 29, 2015
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux: hls: update live refresh interval
parent
72267b16
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
9 deletions
+10
-9
modules/demux/hls/playlist/Representation.cpp
modules/demux/hls/playlist/Representation.cpp
+10
-9
No files found.
modules/demux/hls/playlist/Representation.cpp
View file @
ee8c9ec3
...
...
@@ -106,22 +106,23 @@ void Representation::scheduleNextUpdate(uint64_t number)
/* Compute new update time */
mtime_t
minbuffer
=
getMinAheadTime
(
number
);
/* Update frequency must always be at least targetDuration (if any)*/
/* Update frequency must always be at least targetDuration (if any)
* but we need to update before reaching that last segment, thus -1 */
if
(
targetDuration
)
{
if
(
minbuffer
>=
3
*
CLOCK_FREQ
*
targetDuration
)
minbuffer
-=
2
*
CLOCK_FREQ
*
targetDuration
;
if
(
minbuffer
>
CLOCK_FREQ
*
(
2
*
targetDuration
+
1
))
minbuffer
-=
CLOCK_FREQ
*
(
targetDuration
+
1
);
else
minbuffer
=
CLOCK_FREQ
*
(
targetDuration
-
1
);
}
else
{
minbuffer
/=
2
;
if
(
targetDuration
>
minbuffer
/
CLOCK_FREQ
)
minbuffer
=
targetDuration
*
CLOCK_FREQ
;
if
(
minbuffer
<
10
*
CLOCK_FREQ
)
minbuffer
=
4
*
CLOCK_FREQ
;
else
minbuffer
/=
2
;
}
if
(
minbuffer
<
CLOCK_FREQ
)
minbuffer
=
CLOCK_FREQ
;
nextUpdateTime
=
now
+
minbuffer
/
CLOCK_FREQ
;
msg_Dbg
(
playlist
->
getVLCObject
(),
"Updated playlist ID %s, next update in %"
PRId64
"s"
,
...
...
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