[vlc-commits] demux: adaptive: rename prepareFormatChange
Francois Cartegnie
git at videolan.org
Mon Jul 18 16:19:56 CEST 2016
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Jul 18 16:08:22 2016 +0200| [daff83c63fea951d05070a121c1e4c2e6e753e80] | committer: Francois Cartegnie
demux: adaptive: rename prepareFormatChange
and add a no PCR reset condition
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=daff83c63fea951d05070a121c1e4c2e6e753e80
---
modules/demux/adaptive/Streams.cpp | 9 +++++----
modules/demux/adaptive/Streams.hpp | 2 +-
modules/demux/hls/HLSStreams.cpp | 4 ++--
modules/demux/hls/HLSStreams.hpp | 2 +-
4 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/modules/demux/adaptive/Streams.cpp b/modules/demux/adaptive/Streams.cpp
index 50be19a..aedf574 100644
--- a/modules/demux/adaptive/Streams.cpp
+++ b/modules/demux/adaptive/Streams.cpp
@@ -105,7 +105,7 @@ AbstractStream::~AbstractStream()
vlc_mutex_destroy(&lock);
}
-void AbstractStream::prepareFormatChange()
+void AbstractStream::prepareRestart(bool b_discontinuity)
{
if(demuxer)
{
@@ -113,7 +113,8 @@ void AbstractStream::prepareFormatChange()
demuxer->drain();
/* Enqueue Del Commands for all current ES */
fakeesout->scheduleAllForDeletion();
- fakeesout->schedulePCRReset();
+ if(b_discontinuity)
+ fakeesout->schedulePCRReset();
commandsqueue->Commit();
/* ignoring demuxer's own Del commands */
commandsqueue->setDrop(true);
@@ -281,7 +282,7 @@ AbstractStream::buffering_status AbstractStream::bufferize(mtime_t nz_deadline,
if(discontinuity)
{
msg_Dbg( p_realdemux, "Flushing on format change" );
- prepareFormatChange();
+ prepareRestart();
discontinuity = false;
commandsqueue->setFlush();
vlc_mutex_unlock(&lock);
@@ -318,7 +319,7 @@ AbstractStream::buffering_status AbstractStream::bufferize(mtime_t nz_deadline,
if(discontinuity)
{
msg_Dbg( p_realdemux, "Flushing on discontinuity" );
- prepareFormatChange();
+ prepareRestart();
discontinuity = false;
commandsqueue->setFlush();
vlc_mutex_unlock(&lock);
diff --git a/modules/demux/adaptive/Streams.hpp b/modules/demux/adaptive/Streams.hpp
index 1f85c50..a51b446 100644
--- a/modules/demux/adaptive/Streams.hpp
+++ b/modules/demux/adaptive/Streams.hpp
@@ -101,7 +101,7 @@ namespace adaptive
virtual bool startDemux();
virtual bool restartDemux();
- virtual void prepareFormatChange();
+ virtual void prepareRestart(bool = true);
bool discontinuity;
diff --git a/modules/demux/hls/HLSStreams.cpp b/modules/demux/hls/HLSStreams.cpp
index c17bfd0..e3cf236 100644
--- a/modules/demux/hls/HLSStreams.cpp
+++ b/modules/demux/hls/HLSStreams.cpp
@@ -86,9 +86,9 @@ AbstractDemuxer * HLSStream::createDemux(const StreamFormat &format)
return ret;
}
-void HLSStream::prepareFormatChange()
+void HLSStream::prepareRestart(bool b_discontinuity)
{
- AbstractStream::prepareFormatChange();
+ AbstractStream::prepareRestart(b_discontinuity);
if((unsigned)format == StreamFormat::PACKEDAAC)
{
fakeesout->setTimestampOffset( i_aac_offset );
diff --git a/modules/demux/hls/HLSStreams.hpp b/modules/demux/hls/HLSStreams.hpp
index 5f6c3ba..97e0b8d 100644
--- a/modules/demux/hls/HLSStreams.hpp
+++ b/modules/demux/hls/HLSStreams.hpp
@@ -35,7 +35,7 @@ namespace hls
protected:
virtual AbstractDemuxer * createDemux(const StreamFormat &); /* reimpl */
virtual bool restartDemux(); /* reimpl */
- virtual void prepareFormatChange(); /* reimpl */
+ virtual void prepareRestart(bool = true); /* reimpl */
virtual block_t *checkBlock(block_t *, bool); /* reimpl */
More information about the vlc-commits
mailing list