Files
MP42Foundation/MP42
Scott GarrettandClaude Code 8ba3f25a2c Write added subtitle tracks during Matroska remux
MP42MkvRemuxer previously refused any track present in currentTracks
but not in sourceTracks; it now accepts added MP42SubtitleTracks whose
URL extension is srt/ssa/ass and muxes them into the rebuilt file as
S_TEXT/UTF8. The extension gate mirrors the app-side
DocumentWindowController.matroskaSubtitleExtensions list — the two
must stay in sync.

- Each added track gets an appended TrackEntry: TrackNumber = max of
  all entries + 1 (refuse past 0x3FFF, the 2-byte unmarked-vint
  limit), TrackType 17, FlagEnabled 1, FlagLacing 0, CodecID
  S_TEXT/UTF8, ISO 0x22B59C + IETF 0x22B59D language, Name only when
  it differs from the codec default.
- The model never holds subtitle text, so lines are re-parsed from
  track.URL at save time: SRT via LoadSRTFromURL + serializer drain,
  SSA/ASS via MP42SSAParser/MP42SSAConverter (styling stripped, same
  lossy path the tx3g muxer takes). Zero parsed lines refuses.
- Blocks are written as BlockGroup{Block(unmarked-vint track number,
  int16 BE relative timecode, UTF-8 text), BlockDuration(>=1 ms)}.
  The BlockGroup wrapper is mandatory: a bare Block as a direct
  Cluster child is silently ignored by libebml readers even though
  ffmpeg tolerates it.
- Lines are assigned to the last existing Cluster whose Timecode is
  <= the line's start time (inheriting missing cluster timecodes,
  negative relative timecodes are legal); lines whose relative
  timecode would exceed +32767 flush as synthesized Clusters right
  after that cluster. Original clusters are copied verbatim and
  never split.
- Added tracks join the existing per-track CueTrackPositions
  bookkeeping, and the drop-all-remaining guard still fires before
  additions, so drop-all-plus-add stays refused.

Adds TrackType/FlagLacing/CodecID/BlockDuration element ids to
MP42MatroskaTagMapping.h.

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-11-26 11:53:17 -05:00
..
2013-11-01 08:38:09 +01:00
2026-09-22 20:18:56 +02:00
2022-02-24 10:25:17 +01:00
2026-09-22 20:18:56 +02:00
2026-09-22 20:18:56 +02:00
2026-09-22 20:18:56 +02:00
2022-01-02 09:31:49 +01:00
2022-01-02 09:31:49 +01:00
2024-08-05 12:22:55 +02:00
2022-01-02 09:31:49 +01:00
2022-01-02 09:31:49 +01:00
2022-01-02 09:31:49 +01:00
2022-01-02 09:31:49 +01:00
2022-01-02 09:31:49 +01:00
2022-01-02 09:31:49 +01:00
2022-01-02 09:31:49 +01:00
2022-01-02 09:31:49 +01:00
2022-01-02 09:31:49 +01:00
2022-01-02 09:31:49 +01:00
2022-01-02 09:31:49 +01:00
2022-01-02 09:31:49 +01:00
2022-01-02 09:31:49 +01:00
2022-01-02 09:31:49 +01:00
2022-01-02 09:31:49 +01:00
2022-01-02 09:31:49 +01:00
2026-09-29 19:55:05 +02:00
2026-10-03 11:46:29 +02:00
2022-01-02 09:31:49 +01:00
2022-01-02 09:31:49 +01:00
2022-01-02 09:31:49 +01:00
2022-01-02 09:31:49 +01:00
2022-01-02 09:31:49 +01:00
2022-01-02 09:31:49 +01:00
2022-01-02 09:31:49 +01:00
2022-01-02 09:31:49 +01:00
2024-07-03 14:13:58 +02:00
2022-01-02 09:31:49 +01:00
2022-01-02 09:31:49 +01:00
2022-01-02 09:31:49 +01:00
2022-01-02 09:31:49 +01:00
2026-10-03 11:46:29 +02:00
2022-01-02 09:31:49 +01:00
2022-01-02 09:31:49 +01:00
2022-01-02 09:31:49 +01:00
2022-01-02 09:31:49 +01:00
2024-06-25 12:10:48 +02:00
2021-05-28 14:56:10 +02:00
2021-05-28 14:56:10 +02:00
2022-01-02 09:31:49 +01:00
2022-01-02 09:31:49 +01:00
2022-01-02 09:31:49 +01:00
2022-01-02 09:31:49 +01:00
2022-01-02 09:31:49 +01:00
2022-01-02 09:31:49 +01:00
2022-01-02 09:31:49 +01:00
2022-01-02 09:31:49 +01:00
2022-01-02 09:31:49 +01:00
2022-01-02 09:31:49 +01:00
2022-01-02 09:31:49 +01:00
2022-01-02 09:31:49 +01:00
2022-01-02 09:31:49 +01:00
2022-01-02 09:31:49 +01:00
2026-09-29 19:55:05 +02:00
2017-09-29 22:10:09 +02:00
2017-11-27 09:22:08 +01:00
2024-11-29 12:31:30 +01:00
2013-11-01 10:20:09 +01:00
2013-11-01 10:20:09 +01:00