[vlc-commits] [Git][videolan/vlc][master] demux: hls: add test for subrange continuity
François Cartegnie (@fcartegnie)
gitlab at videolan.org
Thu Jun 12 15:06:22 UTC 2025
François Cartegnie pushed to branch master at VideoLAN / VLC
Commits:
5503b393 by François Cartegnie at 2025-06-12T14:49:51+00:00
demux: hls: add test for subrange continuity
- - - - -
1 changed file:
- modules/demux/adaptive/test/playlist/M3U8.cpp
Changes:
=====================================
modules/demux/adaptive/test/playlist/M3U8.cpp
=====================================
@@ -543,5 +543,42 @@ int M3U8Playlist_test()
return 1;
}
+
+ /* Manifest 6 */
+ const char manifest6[] =
+ "#EXTM3U\n"
+ "#EXT-X-MEDIA-SEQUENCE:10\n"
+ "#EXTINF:1\n"
+ "#EXT-X-BYTERANGE:1000 at 0\n"
+ "foobar.ts\n"
+ "#EXT-X-BYTERANGE:4000 at 2000\n"
+ "foobar.ts\n"
+ "#EXT-X-BYTERANGE:500\n"
+ "foobar.ts\n";
+
+ m3u = ParseM3U8(obj, manifest6, sizeof(manifest6));
+ try
+ {
+ Expect(m3u);
+ BaseRepresentation *rep = m3u->getFirstPeriod()->getAdaptationSets().front()->
+ getRepresentations().front();
+ Segment *seg = rep->getMediaSegment(10);
+ Expect(seg);
+ Expect(seg->getOffset() == 0);
+ seg = rep->getMediaSegment(11);
+ Expect(seg);
+ Expect(seg->getOffset() == 2000);
+ seg = rep->getMediaSegment(12);
+ Expect(seg);
+ Expect(seg->getOffset() == 6000);
+ delete m3u;
+ }
+ catch (...)
+ {
+ delete m3u;
+ return 1;
+ }
+
+
return 0;
}
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/5503b393ec578aca23fb3cb237ade492ff5586d5
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/5503b393ec578aca23fb3cb237ade492ff5586d5
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list