mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-10-27 14:32:35 +01:00
git-svn-id: https://subtitleedit.googlecode.com/svn/trunk@2102 99eadd0c-20b8-1223-b5c4-2a2b2df33de2
This commit is contained in:
parent
f3efda827a
commit
e5b0fdc34a
@ -11,7 +11,8 @@ namespace Nikse.SubtitleEdit.Logic.VobSub
|
||||
|
||||
public readonly UInt32 StartCode;
|
||||
public readonly byte PackIndentifier;
|
||||
public readonly UInt64 SystemClockReferenceQuotient;
|
||||
//public readonly UInt64 SystemClockReferenceQuotient;
|
||||
//public readonly UInt64 SystemClockReferenceRemainder;
|
||||
public readonly UInt64 ProgramMuxRate;
|
||||
public readonly int PackStuffingLength;
|
||||
|
||||
@ -20,13 +21,11 @@ namespace Nikse.SubtitleEdit.Logic.VobSub
|
||||
StartCode = Helper.GetEndian(buffer, 0, 3);
|
||||
PackIndentifier = buffer[3];
|
||||
|
||||
string b4To9AsBinary = Helper.GetBinaryString(buffer, 4, 6);
|
||||
b4To9AsBinary = b4To9AsBinary.Substring(2,3) + b4To9AsBinary.Substring(6,15) + b4To9AsBinary.Substring(22,15);
|
||||
SystemClockReferenceQuotient = Helper.GetUInt32FromBinaryString(b4To9AsBinary);
|
||||
//string b4To9AsBinary = Helper.GetBinaryString(buffer, 4, 6);
|
||||
//b4To9AsBinary = b4To9AsBinary.Substring(2,3) + b4To9AsBinary.Substring(6,15) + b4To9AsBinary.Substring(22,15);
|
||||
//SystemClockReferenceQuotient = Helper.GetUInt32FromBinaryString(b4To9AsBinary);
|
||||
|
||||
string b8And9 = Helper.GetBinaryString(buffer, 8, 2);
|
||||
b8And9 = b8And9.Substring(6, 9);
|
||||
SystemClockReferenceQuotient = Helper.GetUInt32FromBinaryString(b8And9);
|
||||
//SystemClockReferenceRemainder = (ulong)(((buffer[8] & Helper.B00000011) << 8) + buffer[9])
|
||||
|
||||
ProgramMuxRate = Helper.GetEndian(buffer, 10, 3) >> 2;
|
||||
|
||||
|
@ -154,6 +154,7 @@ namespace Nikse.SubtitleEdit.Logic.VobSub
|
||||
{
|
||||
if (ms.Length > 0)
|
||||
list.Add(new VobSubMergedPack(ms.ToArray(), pts, streamId, lastIdxParagraph));
|
||||
ms.Close();
|
||||
ms = new MemoryStream();
|
||||
pts = TimeSpan.FromMilliseconds(Convert.ToDouble(p.PacketizedElementaryStream.PresentationTimeStamp / ticksPerMillisecond)); //90000F * 1000)); (PAL)
|
||||
streamId = p.PacketizedElementaryStream.SubPictureStreamId.Value;
|
||||
@ -166,9 +167,11 @@ namespace Nikse.SubtitleEdit.Logic.VobSub
|
||||
if (ms.Length > 0)
|
||||
{
|
||||
list.Add(new VobSubMergedPack(ms.ToArray(), pts, streamId, lastIdxParagraph));
|
||||
ms.Close();
|
||||
ms = new MemoryStream();
|
||||
}
|
||||
}
|
||||
ms.Close();
|
||||
|
||||
// Remove any bad packs
|
||||
for (int i = list.Count - 1; i >= 0; i--)
|
||||
|
Loading…
Reference in New Issue
Block a user