streaming

Media streaming and broadcast systems in Go
Log | Files | Refs | README | LICENSE

commit 80c44981faf3320c9bcfe60ce32ce789e39d6be6
parent 9ce2d00bb3f6812b28f956350e7553f68d3e1f88
Author: Oliver Lowe <o@olowe.co>
Date:   Thu, 23 May 2024 17:32:42 +1000

m3u8: handle unsupported, non-standard variant tags

Rather than error out; we're not doing a super strict parser.
Later on could do a validator tool. But later!

Diffstat:
Mm3u8/parse.go | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/m3u8/parse.go b/m3u8/parse.go @@ -97,8 +97,9 @@ func parseVariant(items chan item) (*Variant, error) { return nil, fmt.Errorf("missing equals after %s", attr) } switch attr.val { - case "PROGRAM-ID": - return nil, fmt.Errorf("parsing PROGRAM-ID attribute unsupported; removed in HLS version 6") + case "PROGRAM-ID", "NAME": + // parsing PROGRAM-ID attribute unsupported; removed in HLS version 6 + // NAME is non-standard, should be set in Rendition. case "BANDWIDTH", "AVERAGE-BANDWIDTH": it = <-items if it.typ != itemNumber {