Skip to content

Commit

Permalink
Fix reading of DTS-HD streams without extended XLL Metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
UniqProject committed May 4, 2018
1 parent 9f550dd commit 8bb55b0
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions BDInfo/BDROM/TSCodecDTSHD.cs
Original file line number Diff line number Diff line change
Expand Up @@ -213,15 +213,22 @@ public static void Scan(
}

var startPos = 0;
uint temp2 = 0;
foreach (var size in AssetSizes)
{
startPos += size;
}
buffer.Seek(buffer.Length - startPos, SeekOrigin.Begin);
uint temp2 = 0;
for (int j = 0; j < 4; j++)
if (startPos < buffer.Length)
{
buffer.Seek(buffer.Length - startPos, SeekOrigin.Begin);
for (int j = 0; j < 4; j++)
{
temp2 = (temp2 << 8) + buffer.ReadByte();
}
}
else
{
temp2 = (temp2 << 8) + buffer.ReadByte();
temp2 = 0;
}

if (temp2 == 0x41A29547) //XLL Extended data
Expand Down

0 comments on commit 8bb55b0

Please sign in to comment.