Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Steve Lhomme
VLC
Commits
91f528c9
Commit
91f528c9
authored
Jun 09, 2016
by
François Cartegnie
🤞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux: adaptive: set demux time offset to segment start, not seek time
otherwise creates out of sync multiple streams with mp4
parent
b63d70ee
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
4 deletions
+13
-4
modules/demux/adaptive/Streams.cpp
modules/demux/adaptive/Streams.cpp
+12
-4
modules/demux/adaptive/Streams.hpp
modules/demux/adaptive/Streams.hpp
+1
-0
No files found.
modules/demux/adaptive/Streams.cpp
View file @
91f528c9
...
...
@@ -250,6 +250,7 @@ AbstractStream::status AbstractStream::demux(mtime_t nz_deadline, bool send)
dead
=
true
;
/* Prevent further retries */
return
AbstractStream
::
status_eof
;
}
setTimeOffset
();
}
if
(
nz_deadline
+
VLC_TS_0
>
getBufferingLevel
())
/* not already demuxed */
...
...
@@ -351,10 +352,7 @@ bool AbstractStream::setPosition(mtime_t time, bool tryonly)
if
(
!
restartDemux
()
)
dead
=
true
;
/* Check if we need to set an offset as the demuxer
* will start from zero from seek point */
if
(
demuxer
->
alwaysStartsFromZero
())
fakeesout
->
setTimestampOffset
(
time
);
setTimeOffset
();
}
pcr
=
VLC_TS_INVALID
;
...
...
@@ -383,6 +381,16 @@ void AbstractStream::fillExtraFMTInfo( es_format_t *p_fmt ) const
p_fmt
->
psz_description
=
strdup
(
description
.
c_str
());
}
void
AbstractStream
::
setTimeOffset
()
{
/* Check if we need to set an offset as the demuxer
* will start from zero from seek point */
if
(
demuxer
&&
demuxer
->
alwaysStartsFromZero
())
fakeesout
->
setTimestampOffset
(
segmentTracker
->
getPlaybackTime
());
else
fakeesout
->
setTimestampOffset
(
0
);
}
void
AbstractStream
::
trackerEvent
(
const
SegmentTrackerEvent
&
event
)
{
switch
(
event
.
type
)
...
...
modules/demux/adaptive/Streams.hpp
View file @
91f528c9
...
...
@@ -86,6 +86,7 @@ namespace adaptive
protected:
bool
seekAble
()
const
;
virtual
void
setTimeOffset
();
virtual
block_t
*
checkBlock
(
block_t
*
,
bool
)
=
0
;
virtual
AbstractDemuxer
*
createDemux
(
const
StreamFormat
&
)
=
0
;
virtual
bool
startDemux
();
...
...
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