mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-10-27 14:32:35 +01:00
Fixed code from commit r2103, so it actually works...
git-svn-id: https://subtitleedit.googlecode.com/svn/trunk@2107 99eadd0c-20b8-1223-b5c4-2a2b2df33de2
This commit is contained in:
parent
a657db1569
commit
0584c497db
@ -65,9 +65,12 @@ namespace Nikse.SubtitleEdit.Logic.VobSub
|
|||||||
if (PresentationTimeStampDecodeTimeStampFlags == Helper.B00000010 ||
|
if (PresentationTimeStampDecodeTimeStampFlags == Helper.B00000010 ||
|
||||||
PresentationTimeStampDecodeTimeStampFlags == Helper.B00000011)
|
PresentationTimeStampDecodeTimeStampFlags == Helper.B00000011)
|
||||||
{
|
{
|
||||||
ulong pts = (ulong)(((buffer[tempIndex + 3]) << 7) + ((buffer[tempIndex + 4] & Helper.B11111110) >> 1));
|
PresentationTimeStamp = (ulong)buffer[tempIndex + 4] >> 1;
|
||||||
pts += (ulong)(((buffer[tempIndex + 1]) << 7) + (buffer[tempIndex + 2] >> 1)) << 15;
|
PresentationTimeStamp += (ulong)buffer[tempIndex + 3] << 7;
|
||||||
pts += (ulong)((buffer[tempIndex] & Helper.B00001110) << 29);
|
PresentationTimeStamp += (ulong)(buffer[tempIndex + 2] & Helper.B11111110) << 14;
|
||||||
|
PresentationTimeStamp += (ulong)buffer[tempIndex + 1] << 22;
|
||||||
|
PresentationTimeStamp += (ulong)(buffer[tempIndex + 0] & Helper.B00001110) << 29;
|
||||||
|
|
||||||
//string bString = Helper.GetBinaryString(buffer, tempIndex, 5);
|
//string bString = Helper.GetBinaryString(buffer, tempIndex, 5);
|
||||||
//bString = bString.Substring(4, 3) + bString.Substring(8, 15) + bString.Substring(24, 15);
|
//bString = bString.Substring(4, 3) + bString.Substring(8, 15) + bString.Substring(24, 15);
|
||||||
//PresentationTimeStamp = Convert.ToUInt64(bString, 2);
|
//PresentationTimeStamp = Convert.ToUInt64(bString, 2);
|
||||||
@ -78,9 +81,12 @@ namespace Nikse.SubtitleEdit.Logic.VobSub
|
|||||||
//string bString = Helper.GetBinaryString(buffer, tempIndex, 5);
|
//string bString = Helper.GetBinaryString(buffer, tempIndex, 5);
|
||||||
//bString = bString.Substring(4, 3) + bString.Substring(8, 15) + bString.Substring(24, 15);
|
//bString = bString.Substring(4, 3) + bString.Substring(8, 15) + bString.Substring(24, 15);
|
||||||
//DecodeTimeStamp = Convert.ToUInt64(bString, 2);
|
//DecodeTimeStamp = Convert.ToUInt64(bString, 2);
|
||||||
ulong dts = (ulong)(((buffer[tempIndex + 3]) << 7) + ((buffer[tempIndex + 4] & Helper.B11111110) >> 1));
|
|
||||||
dts += (ulong)(((buffer[tempIndex + 1]) << 7) + (buffer[tempIndex + 2] >> 1)) << 15;
|
DecodeTimeStamp = (ulong)buffer[tempIndex + 4] >> 1;
|
||||||
dts += (ulong)((buffer[tempIndex] & Helper.B00001110) << 29);
|
DecodeTimeStamp += (ulong)buffer[tempIndex + 3] << 7;
|
||||||
|
DecodeTimeStamp += (ulong)(buffer[tempIndex + 2] & Helper.B11111110) << 14;
|
||||||
|
DecodeTimeStamp += (ulong)buffer[tempIndex + 1] << 22;
|
||||||
|
DecodeTimeStamp += (ulong)(buffer[tempIndex + 0] & Helper.B00001110) << 29;
|
||||||
}
|
}
|
||||||
|
|
||||||
int dataIndex = index + HeaderDataLength + 24 - Mpeg2Header.Length;
|
int dataIndex = index + HeaderDataLength + 24 - Mpeg2Header.Length;
|
||||||
|
Loading…
Reference in New Issue
Block a user