diff --git a/reader.go b/reader.go index 6cc1137e..98484d04 100644 --- a/reader.go +++ b/reader.go @@ -450,6 +450,9 @@ func decodeLineOfMediaPlaylist(p *MediaPlaylist, wv *WV, state *decodingState, l var err error line = strings.TrimSpace(line) + if len(line) == 0 { + return err + } // check for custom tags first to allow custom parsing of existing tags if p.Custom != nil {