From 1c2d7158e764e9eca66905617e3f613c51b14a84 Mon Sep 17 00:00:00 2001 From: mengxiaowei Date: Wed, 15 Jan 2020 14:52:05 +0800 Subject: [PATCH] check decodingState custom if nil, init it --- reader.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/reader.go b/reader.go index b19324eb..2a2769ea 100644 --- a/reader.go +++ b/reader.go @@ -463,6 +463,9 @@ func decodeLineOfMediaPlaylist(p *MediaPlaylist, wv *WV, state *decodingState, l if v.SegmentTag() { state.tagCustom = true + if state.custom == nil { + state.custom = make(map[string]CustomTag) + } state.custom[v.TagName()] = t } else { p.Custom[v.TagName()] = t