[vlc-commits] demux: adaptative: fix mp4 seek after streamdemux restart
Francois Cartegnie
git at videolan.org
Wed Sep 23 21:15:10 CEST 2015
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Sep 23 21:02:45 2015 +0200| [b1f16e27a12b8ad137e895dd260eec9bbc56df4e] | committer: Francois Cartegnie
demux: adaptative: fix mp4 seek after streamdemux restart
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b1f16e27a12b8ad137e895dd260eec9bbc56df4e
---
modules/demux/adaptative/plumbing/Demuxer.cpp | 5 +++++
modules/demux/adaptative/plumbing/StreamOutput.cpp | 4 ++++
2 files changed, 9 insertions(+)
diff --git a/modules/demux/adaptative/plumbing/Demuxer.cpp b/modules/demux/adaptative/plumbing/Demuxer.cpp
index e006890..b6811c0 100644
--- a/modules/demux/adaptative/plumbing/Demuxer.cpp
+++ b/modules/demux/adaptative/plumbing/Demuxer.cpp
@@ -51,6 +51,11 @@ StreamDemux::StreamDemux(demux_t *p_realdemux_, const std::string &name_, es_out
name = name_;
p_realdemux = p_realdemux_;
+ if(name == "mp4")
+ {
+ b_startsfromzero = true;
+ }
+
restart();
if(!demuxstream)
diff --git a/modules/demux/adaptative/plumbing/StreamOutput.cpp b/modules/demux/adaptative/plumbing/StreamOutput.cpp
index 6a5a37c..a8f31f2 100644
--- a/modules/demux/adaptative/plumbing/StreamOutput.cpp
+++ b/modules/demux/adaptative/plumbing/StreamOutput.cpp
@@ -121,6 +121,10 @@ void BaseStreamOutput::setPosition(mtime_t nztime)
restart();
fakeesout->commandsqueue.Abort( true );
fakeesout->recycleAll();
+ /* Check if we need to set an offset as the demuxer
+ * will start from zero from seek point */
+ if(demuxer->alwaysStartsFromZero())
+ fakeesout->setTimestampOffset(nztime);
}
es_out_Control(realdemux->out, ES_OUT_SET_NEXT_DISPLAY_TIME,
More information about the vlc-commits
mailing list