[vlc-commits] demux: hls: avoid redundant update of playlist

Zhao Zhili git at videolan.org
Tue Dec 5 11:48:43 CET 2017


vlc/vlc-3.0 | branch: master | Zhao Zhili <quinkblack at foxmail.com> | Fri Dec  1 17:52:53 2017 +0800| [173740fea3c0079364ca84f9cb2616d820bb3260] | committer: Jean-Baptiste Kempf

demux: hls: avoid redundant update of playlist

Signed-off-by: Francois Cartegnie <fcvlcdev at free.fr>
(cherry picked from commit 390078318d4f62827a5f185bf922e9b03052a19b)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 modules/demux/hls/playlist/Parser.cpp | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/modules/demux/hls/playlist/Parser.cpp b/modules/demux/hls/playlist/Parser.cpp
index 928962e626..b5490248c4 100644
--- a/modules/demux/hls/playlist/Parser.cpp
+++ b/modules/demux/hls/playlist/Parser.cpp
@@ -159,6 +159,12 @@ void M3U8Parser::createAndFillRepresentation(vlc_object_t *p_obj, BaseAdaptation
     if(rep)
     {
         parseSegments(p_obj, rep, tagslist);
+        if(rep->isLive())
+        {
+            /* avoid update playlist immediately */
+            uint64_t startseq = rep->getLiveStartSegmentNumber(0);
+            rep->scheduleNextUpdate(startseq);
+        }
         adaptSet->addRepresentation(rep);
     }
 }



More information about the vlc-commits mailing list