Skip to content

Commit

Permalink
Workaround for 127 character MKV track titles
Browse files Browse the repository at this point in the history
  • Loading branch information
VoidXH committed Jan 29, 2025
1 parent 79275fd commit f1b16c4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Cavern.Format/Container/Matroska/MatroskaTreeWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ public void Write(int tag, float value) {
/// </summary>
public void Write(int tag, string value) {
VarInt.WriteTag(writer, tag);
if (value.Length == 127) {
value += ' '; // This specific length breaks FFmpeg/libavcodec for some reason
}
VarInt.Write(writer, value.Length);
writer.Write(Encoding.ASCII.GetBytes(value));
}
Expand Down

0 comments on commit f1b16c4

Please sign in to comment.