[vlc-commits] demux: hls: fix inconsistent segment number matching

Francois Cartegnie git at videolan.org
Tue Nov 24 17:51:31 CET 2015


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Nov 24 17:48:29 2015 +0100| [cac5bd833a71af4a7e438e5965b0fc364544aa2a] | committer: Francois Cartegnie

demux: hls: fix inconsistent segment number matching

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cac5bd833a71af4a7e438e5965b0fc364544aa2a
---

 modules/demux/hls/playlist/Representation.cpp |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/demux/hls/playlist/Representation.cpp b/modules/demux/hls/playlist/Representation.cpp
index 43f8106..591e33c 100644
--- a/modules/demux/hls/playlist/Representation.cpp
+++ b/modules/demux/hls/playlist/Representation.cpp
@@ -164,7 +164,7 @@ uint64_t Representation::translateSegmentNumber(uint64_t num, const SegmentInfor
         const HLSSegment *hlsSeg = dynamic_cast<HLSSegment *>(*it);
         if(hlsSeg)
         {
-            if (hlsSeg->getUTCTime() <= utcTime)
+            if (hlsSeg->getUTCTime() <= utcTime || it == list.begin())
                 num = hlsSeg->getSequenceNumber();
             else
                 return num;



More information about the vlc-commits mailing list