[vlc-commits] [Git][videolan/vlc][master] 2 commits: demux: adaptive: check the next iterator against the vector end

Steve Lhomme (@robUx4) gitlab at videolan.org
Sat Jul 25 08:57:59 UTC 2026



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
4bdf6021 by Steve Lhomme at 2026-07-25T08:45:18+00:00
demux: adaptive: check the next iterator against the vector end

The original test was always true in the loop. We need to to check the
iterator we are going to dereference.

Fixes #29801

- - - - -
8c34846d by Steve Lhomme at 2026-07-25T08:45:18+00:00
demux: adaptive: only use the "t" attributes if they exist

It might not be the case as seen in the code below.

- - - - -


1 changed file:

- modules/demux/smooth/playlist/SmoothParser.cpp


Changes:

=====================================
modules/demux/smooth/playlist/SmoothParser.cpp
=====================================
@@ -90,11 +90,11 @@ static SegmentTimeline *createTimeline(Node *streamIndexNode)
                 cur.duration = Integer<uint64_t>(chunk->getAttributeValue("d"));
                 b_cur_is_repeat &= (cur.duration == prev.duration);
             }
-            else
+            else if((it + 1) != chunks.end())
             {
-                if(it != chunks.end())
+                const Node *nextchunk = *(it + 1);
+                if (nextchunk->hasAttribute("t") && chunk->hasAttribute("t"))
                 {
-                    const Node *nextchunk = *(it + 1);
                     cur.duration = Integer<uint64_t>(nextchunk->getAttributeValue("t"))
                                  - Integer<uint64_t>(chunk->getAttributeValue("t"));
                     b_cur_is_repeat &= (cur.duration == prev.duration);



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/f7d12646eeffd1008b655075db759ed2534485fa...8c34846dc494cb821c79fcbdaa56f363dc2a563a

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/f7d12646eeffd1008b655075db759ed2534485fa...8c34846dc494cb821c79fcbdaa56f363dc2a563a
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help




More information about the vlc-commits mailing list