public static void Parse(this M3U8Parser parser, Uri baseUrl, Stream stream, Encoding encoding = null) { if (null == encoding) { encoding = UriExtensions.HasExtension(baseUrl, ".m3u") ? SmEncodings.Latin1 : Encoding.UTF8; } using (StreamReader streamReader = new StreamReader(stream, encoding)) M3U8ParserExtensions.Parse(parser, baseUrl, (TextReader)streamReader); }