Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error - Byte Length Mismatch #18

Open
IcedLemondrops opened this issue Dec 2, 2024 · 2 comments
Open

Error - Byte Length Mismatch #18

IcedLemondrops opened this issue Dec 2, 2024 · 2 comments

Comments

@IcedLemondrops
Copy link

Framework: .NET 8.0.2
RuntimeIdentifier: win-x64
OS: Microsoft Windows 10.0.19045

{
"filePath": "",
"tracks": [
{
"trackLengthByteNumber": 4386,
"number": 1,
"flagDefault": false,
"flagDefaultByteNumber": 0,
"flagForced": false,
"flagForcedByteNumber": 0,
"flagTypebytenumber": 4395,
"type": "video",
"name": "The Big Bang Theory | Season 02 (2008-2009) | 01: The Bad Fish Paradigm",
"language": "eng"
},
{
"trackLengthByteNumber": 4576,
"number": 2,
"flagDefault": false,
"flagDefaultByteNumber": 0,
"flagForced": false,
"flagForcedByteNumber": 0,
"flagTypebytenumber": 4592,
"type": "audio",
"name": "DD 5.1 @ 640 kbps (Kuraj-Bambey \u043F\u043E \u0437\u0430\u043A\u0430\u0437\u0443 Paramount Comedy)",
"language": "rus"
},
{
"trackLengthByteNumber": 4704,
"number": 3,
"flagDefault": true,
"flagDefaultByteNumber": 4719,
"flagForced": false,
"flagForcedByteNumber": 0,
"flagTypebytenumber": 4716,
"type": "audio",
"name": "DD 5.1 @ 640 kbps",
"language": "eng"
},
{
"trackLengthByteNumber": 4774,
"number": 4,
"flagDefault": false,
"flagDefaultByteNumber": 4793,
"flagForced": false,
"flagForcedByteNumber": 0,
"flagTypebytenumber": 4790,
"type": "subtitle",
"name": "rus-sub",
"language": "rus"
},
{
"trackLengthByteNumber": 4835,
"number": 5,
"flagDefault": false,
"flagDefaultByteNumber": 4850,
"flagForced": false,
"flagForcedByteNumber": 0,
"flagTypebytenumber": 4847,
"type": "subtitle",
"name": "eng-sub",
"language": "eng"
}
],
"seekList": [
{
"seekId": 357149030,
"seekPosition": 4099,
"seekPositionByteNumber": 70,
"elementLength": 2
},
{
"seekId": 374648427,
"seekPosition": 4325,
"seekPositionByteNumber": 85,
"elementLength": 2
},
{
"seekId": 475249515,
"seekPosition": 2002361120,
"seekPositionByteNumber": 100,
"elementLength": 4
},
{
"seekId": 307544935,
"seekPosition": 2002386675,
"seekPositionByteNumber": 117,
"elementLength": 4
},
{
"seekId": 272869232,
"seekPosition": 6048,
"seekPositionByteNumber": 134,
"elementLength": 2
}
],
"seekHeadCheckSum": null,
"tracksCheckSum": null,
"voidPosition": 136,
"endPosition": 4883,
"tracksPosition": 4383,
"beginHeaderPosition": 4151
}

System.InvalidOperationException: New length bytes are not the same length as the old ones. Old length: 1, new length: 2
at MatroskaLib.ByteHelper.ChangeLength(List1 lsBytes, Int32 position, List1 lsLengthBytes, Int32 newAdition)
at MatroskaLib.ByteHelper.ChangeLength(List1 lsBytes, Int32 position, UInt64 elementId, Int32 newAdition) at MatroskaLib.MatroskaWriter._ChangeTrackElements(List1 tracks, List1 lsBytes, Int32& offset) at MatroskaLib.MatroskaWriter.WriteMkvFile(MkvFile mkfFile, Boolean dryRun) at MatroskaLib.MkvFilesContainer.WriteChanges(Action1 setDefaultIfSelected)
at MkvDefaultTrackChanger.MainForm.BtnApplyClicked(Object sender, EventArgs e)

@MikeMoolenaar
Copy link
Owner

Will look into this soon, thank you for reporting!

@MikeMoolenaar
Copy link
Owner

I can't reproduce it unfortunately, could you share me the link to the file or the file itself via Email if you feel comfortable doing so? My email is in my Github profile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants