hlsmultivariantsink: Fix master playlist version

hlscmafsink already uses version 6 as use of tags like EXT-X-MAP
require version 5 and above.

As per RFC 8216, the value of EXT-X-VERSION tag (Section 4.3.1.2)
SHOULD NOT be greater than what is required for the tags & attributes
in the Playlist (see Section 7).

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2415>
This commit is contained in:
Sanchayan Maity 2025-08-05 11:59:39 +05:30
parent 45c30065a7
commit 750fd2c589

View file

@ -1871,10 +1871,17 @@ impl HlsMultivariantSink {
let multivariant_playlist_filename = path::Path::new(&multivariant_playlist_location)
.to_str()
.expect("multivariant playlist path to string conversion failed");
let muxer_type = settings.muxer_type;
drop(settings);
let version = if muxer_type == HlsMultivariantSinkMuxerType::Cmaf {
Some(6)
} else {
Some(4)
};
let playlist = MasterPlaylist {
version: Some(4),
version,
variants: variant_streams,
alternatives,
..Default::default()