[vlc-commits] demux: adaptative: fix regression if pcr is first set alone
Francois Cartegnie
git at videolan.org
Thu Jul 16 23:04:28 CEST 2015
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Jul 16 22:58:25 2015 +0200| [052ac2b085f20f0f2d70f34d572f4b27052a87f1] | committer: Francois Cartegnie
demux: adaptative: fix regression if pcr is first set alone
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=052ac2b085f20f0f2d70f34d572f4b27052a87f1
---
modules/demux/adaptative/Streams.cpp | 2 +-
modules/demux/dash/dash.cpp | 5 +++--
modules/demux/hls/hls.cpp | 5 +++--
3 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/modules/demux/adaptative/Streams.cpp b/modules/demux/adaptative/Streams.cpp
index 090fe12..64c5e76 100644
--- a/modules/demux/adaptative/Streams.cpp
+++ b/modules/demux/adaptative/Streams.cpp
@@ -276,7 +276,7 @@ void Stream::prune()
AbstractStreamOutput::AbstractStreamOutput(demux_t *demux, const StreamFormat &format_)
{
realdemux = demux;
- pcr = VLC_TS_0;
+ pcr = VLC_TS_INVALID;
group = 0;
format = format_;
}
diff --git a/modules/demux/dash/dash.cpp b/modules/demux/dash/dash.cpp
index d06159c..fb996f0 100644
--- a/modules/demux/dash/dash.cpp
+++ b/modules/demux/dash/dash.cpp
@@ -190,8 +190,9 @@ static int Demux(demux_t *p_demux)
{
return VLC_DEMUXER_EOF;
}
- mtime_t i_dts = p_sys->p_dashManager->getFirstDTS();
- p_sys->i_nzpcr = i_dts;
+ p_sys->i_nzpcr = p_sys->p_dashManager->getFirstDTS();
+ if(p_sys->i_nzpcr == VLC_TS_INVALID)
+ p_sys->i_nzpcr = p_sys->p_dashManager->getPCR();
}
Stream::status status =
diff --git a/modules/demux/hls/hls.cpp b/modules/demux/hls/hls.cpp
index 600e681..d40070c 100644
--- a/modules/demux/hls/hls.cpp
+++ b/modules/demux/hls/hls.cpp
@@ -227,8 +227,9 @@ static int Demux(demux_t *p_demux)
{
return VLC_DEMUXER_EOF;
}
- mtime_t i_dts = p_sys->p_manager->getFirstDTS();
- p_sys->i_nzpcr = i_dts;
+ p_sys->i_nzpcr = p_sys->p_manager->getFirstDTS();
+ if(p_sys->i_nzpcr == VLC_TS_INVALID)
+ p_sys->i_nzpcr = p_sys->p_manager->getPCR();
}
Stream::status status =
More information about the vlc-commits
mailing list