iheartradio / open-m3u8

Open Source m3u8 Parser
Other
245 stars 94 forks source link

Bug in MasterPlaylist constructor? #23

Closed ketankhairnar closed 8 years ago

ketankhairnar commented 8 years ago

Please checkout below 2 lines from the constructor of com.iheartradio.m3u8.data.MasterPlaylist.
mPlaylists = playlists == null ? Collections.emptyList() : Collections.unmodifiableList(playlists); mIFramePlaylists = playlists == null ? Collections.emptyList() : Collections.unmodifiableList(iFramePlaylists);

If one forgets to add IFrameStreamInfo list while creating MasterPlaylist. It throws runtime NPE

Wopple commented 8 years ago

Thanks @ketankhairnar !

I will create a fix shortly.

Wopple commented 8 years ago

I have released 0.2.1 with the fix to maven central. It may be a couple hours before it becomes publicly available.

ketankhairnar commented 8 years ago

:+1: