untangledco / streaming

Media streaming and broadcast systems in Go

Home Page:https://twitch.tv/untangledco

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

m3u8: catch invalid CCInfo.ID values

ollytom opened this issue · comments

In parseCCInfo(), we can parse values for the ID field that are invalid. The only valid values for CCInfo.ID are the 4 integers 1, 2, 3, 4. For example, we parse this playlist without error:

#EXTM3U
#EXT-X-VERSION:7
#EXT-X-MEDIA:TYPE=AUDIO,INSTREAM-ID="CC69"

The only valid values for the INSTREAM-ID attribute are "CC1", "CC2", "CC3", "CC4" and "SERVICE1" through "SERVICE63".