MikeMoolenaar / MkvDefaultTrackChanger

Cross platform application to change the default subtitle and audio tracks in MKV video files.
https://mkvdefaulttrackchanger.pages.dev
GNU General Public License v3.0
42 stars 3 forks source link

Error on some files #10

Closed GizerCMD closed 8 months ago

GizerCMD commented 8 months ago

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

{ "filePath": "", "tracks": [ { "trackLengthByteNumber": 331, "number": 1, "flagDefault": false, "flagDefaultByteNumber": 0, "flagForced": false, "flagForcedByteNumber": 0, "flagTypebytenumber": 374, "type": "video", "name": "", "language": "und" }, { "trackLengthByteNumber": 479, "number": 2, "flagDefault": true, "flagDefaultByteNumber": 515, "flagForced": false, "flagForcedByteNumber": 0, "flagTypebytenumber": 526, "type": "audio", "name": "Deutsch", "language": "deu" }, { "trackLengthByteNumber": 555, "number": 3, "flagDefault": false, "flagDefaultByteNumber": 0, "flagForced": false, "flagForcedByteNumber": 0, "flagTypebytenumber": 611, "type": "audio", "name": "Englisch [Original]", "language": "eng" }, { "trackLengthByteNumber": 640, "number": 4, "flagDefault": false, "flagDefaultByteNumber": 676, "flagForced": false, "flagForcedByteNumber": 0, "flagTypebytenumber": 692, "type": "subtitle", "name": "Deutsch", "language": "deu" }, { "trackLengthByteNumber": 702, "number": 5, "flagDefault": false, "flagDefaultByteNumber": 738, "flagForced": false, "flagForcedByteNumber": 0, "flagTypebytenumber": 754, "type": "subtitle", "name": "Deutsch", "language": "deu" }, { "trackLengthByteNumber": 764, "number": 6, "flagDefault": false, "flagDefaultByteNumber": 805, "flagForced": false, "flagForcedByteNumber": 0, "flagTypebytenumber": 821, "type": "subtitle", "name": "Deutsch [CC]", "language": "deu" }, { "trackLengthByteNumber": 831, "number": 7, "flagDefault": false, "flagDefaultByteNumber": 884, "flagForced": false, "flagForcedByteNumber": 0, "flagTypebytenumber": 900, "type": "subtitle", "name": "German [ForcedNarrative]", "language": "deu" } ], "seekList": [ { "seekId": 357149030, "seekPosition": 161, "seekPositionByteNumber": 76 }, { "seekId": 374648427, "seekPosition": 258, "seekPositionByteNumber": 90 }, { "seekId": 423732329, "seekPosition": 849, "seekPositionByteNumber": 105 }, { "seekId": 307544935, "seekPosition": 2560940, "seekPositionByteNumber": 120 }, { "seekId": 475249515, "seekPosition": 2375991004, "seekPositionByteNumber": 136 } ], "seekHeadCheckSum": 57, "tracksCheckSum": 316, "voidPosition": 140, "endPosition": 901, "tracksPosition": 316, "beginHeaderPosition": 213 }

System.Exception: New seekposition doesn't fit into existing element at MatroskaLib.MatroskaWriter._ChangeVoidLengthAndHeaders(List1 seekList, Nullable1 seekHeadCheckSum, Nullable1 tracksCheckSum, Int32 voidPosition, Int32 beginHeaderPosition, Int32 offset, List1 lsBytes) at MatroskaLib.MatroskaWriter.WriteMkvFile(MkvFile mkfFile) at MatroskaLib.MkvFilesContainer.WriteChanges(Action`1 setDefaultIfSelected) at MkvDefaultTrackChanger.MainForm.BtnApplyClicked(Object sender, EventArgs e)

Error happens on multiple different Files

MikeMoolenaar commented 8 months ago

Oeh you hit a niche error that I didn't think anyone would get, nice. I'd like to reproduce this and maybe fix, what is the full file name? If you don't want to share it publicly, you can email me (email is on my GitHub profile).

GizerCMD commented 8 months ago

The Filepath is "X:\PirateShip\media_public\Filme\Murder Mystery [imdbid-tt1618434]\Murder Mystery [imdbid-tt1618434] - 1080P.mkv"

MikeMoolenaar commented 8 months ago

I can't find it unfortunately , can you maybe send it via Wetransfer or something via email?

GizerCMD commented 8 months ago

I send you an Email with a GoogleDrive link to the file

MikeMoolenaar commented 8 months ago

Thanks! I got a working fix locally, just need to test it properly with other files. Will create a release this week.

MikeMoolenaar commented 8 months ago

Hi I just created release 1.2.0 which solves this issue! Thanks for helping me fix this.