diff options
| author | BaronGreenback <jimcartlidge@yahoo.co.uk> | 2020-06-20 19:23:56 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-06-20 19:23:56 +0100 |
| commit | b5586e64f5d815f4449930dc53a61a676d0e2df4 (patch) | |
| tree | c82204256da3850fe6bad1e545135caed04d9cf0 /DvdLib/Ifo/Dvd.cs | |
| parent | b2e1d7019130f7bf7e74c8af29927226fb30d46c (diff) | |
| parent | bb947718eaee3a8381d9b9e6ed926676de39d7c9 (diff) | |
Merge pull request #25 from jellyfin/master
Update my master
Diffstat (limited to 'DvdLib/Ifo/Dvd.cs')
| -rw-r--r-- | DvdLib/Ifo/Dvd.cs | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/DvdLib/Ifo/Dvd.cs b/DvdLib/Ifo/Dvd.cs index ca20baa73..361319625 100644 --- a/DvdLib/Ifo/Dvd.cs +++ b/DvdLib/Ifo/Dvd.cs @@ -117,12 +117,19 @@ namespace DvdLib.Ifo uint chapNum = 1; vtsFs.Seek(baseAddr + offsets[titleNum], SeekOrigin.Begin); var t = Titles.FirstOrDefault(vtst => vtst.IsVTSTitle(vtsNum, titleNum + 1)); - if (t == null) continue; + if (t == null) + { + continue; + } do { t.Chapters.Add(new Chapter(vtsRead.ReadUInt16(), vtsRead.ReadUInt16(), chapNum)); - if (titleNum + 1 < numTitles && vtsFs.Position == (baseAddr + offsets[titleNum + 1])) break; + if (titleNum + 1 < numTitles && vtsFs.Position == (baseAddr + offsets[titleNum + 1])) + { + break; + } + chapNum++; } while (vtsFs.Position < (baseAddr + endaddr)); @@ -147,7 +154,10 @@ namespace DvdLib.Ifo uint vtsPgcOffset = vtsRead.ReadUInt32(); var t = Titles.FirstOrDefault(vtst => vtst.IsVTSTitle(vtsNum, titleNum)); - if (t != null) t.AddPgc(vtsRead, startByte + vtsPgcOffset, entryPgc, pgcNum); + if (t != null) + { + t.AddPgc(vtsRead, startByte + vtsPgcOffset, entryPgc, pgcNum); + } } } } |
