diff --git a/src/N_m3u8DL-RE.Parser/Mp4/MP4TtmlUtil.cs b/src/N_m3u8DL-RE.Parser/Mp4/MP4TtmlUtil.cs index 936f48d..427da8d 100644 --- a/src/N_m3u8DL-RE.Parser/Mp4/MP4TtmlUtil.cs +++ b/src/N_m3u8DL-RE.Parser/Mp4/MP4TtmlUtil.cs @@ -90,6 +90,12 @@ namespace Mp4SubtitleParser { var _begin = _p.GetAttribute("begin"); var _end = _p.GetAttribute("end"); + //Handle namespace + foreach (XmlAttribute attr in _p.Attributes) + { + if (attr.LocalName == "begin") _begin = attr.Value; + else if (attr.LocalName == "end") _end = attr.Value; + } _p.SetAttribute("begin", Add(_begin)); _p.SetAttribute("end", Add(_end)); //Console.WriteLine($"{_begin} {_p.GetAttribute("begin")}"); @@ -278,6 +284,13 @@ namespace Mp4SubtitleParser var _end = _p.GetAttribute("end"); var _region = _p.GetAttribute("region"); var _bgImg = _p.GetAttribute("smpte:backgroundImage"); + //Handle namespace + foreach (XmlAttribute attr in _p.Attributes) + { + if (attr.LocalName == "begin") _begin = attr.Value; + else if (attr.LocalName == "end") _end = attr.Value; + else if (attr.LocalName == "region") _region = attr.Value; + } var sub = new SubEntity { Begin = _begin,