Commit b1f16e27 authored by Francois Cartegnie's avatar Francois Cartegnie

demux: adaptative: fix mp4 seek after streamdemux restart

parent 2678b03b
......@@ -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)
......
......@@ -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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment