Commit Graph
3 Commits
Author SHA1 Message Date
Max Murphy 2472b890ac MP4 rtmd: reject drop-frame labels that counting skips
Drop-frame counting never emits the first base/15 frame labels of a minute
except each tenth (frames 00-01 at 29.97, 00-03 at 59.94). Accepting them let
a damaged 00:01:00;00 normalize to a different start time, so fields_to_frames
now rejects those labels and the start timecode is left unset.
2026-10-10 10:21:03 -04:00
Max Murphy 83fb73b9b1 MP4 rtmd: bound the header read and reject damaged timecode fields
Address review of #460:
- Read only the fixed-size rtmd header (18 bytes) instead of read_sample,
  which allocated the whole untrusted stsz size (a corrupt multi-GiB size
  could exhaust memory during import).
- Validate hours/minutes/seconds/frames against the frame base and drop the
  start timecode when they are out of range, instead of normalizing damaged
  metadata into a plausible but wrong offset.
2026-10-10 10:21:02 -04:00
Max Murphy 23b4bf24b1 MP4: read the start timecode from a Sony rtmd track when there is no tmcd
Sony XAVC cameras such as the FX3 and a6400 keep the clip's start timecode
in an rtmd (real-time metadata) data track rather than a QuickTime tmcd
track, so probe reported start_timecode: null and timecode sync could not
use the footage. Read the hours/minutes/seconds/drop-frame/frames block from
the first rtmd sample and expose it as MediaInfo::start_timecode, falling
back only when no tmcd track is present (#460).
2026-10-10 10:20:33 -04:00