Skip to content

chore: report symphonia's 1 KB hvcC cap upstream #75

Description

@justin13888

symphonia-format-isomp4 hard-caps the hvcC HEVCDecoderConfigurationRecord at 1 KB:

const MAX_HVCC_ATOM_SIZE: u64 = 1 * 1024;
// "This record forms the defacto codec extra data. It should not exceed 1 kB."
Some(_) => return decode_error("isomp4 (hvcC): atom size is greater than 1 kb"),

That comment is wrong. Real HEVC records routinely exceed 1 KB — a plain ffmpeg -c:v libx265 clip produced a 2440-byte hvcC here, and camera encoders are larger. avcC carries the same cap (MAX_AVCC_ATOM_SIZE), which is more generous in practice for AVC but is the same class of bug.

The error aborts IsoMp4Reader::try_new, so every affected file fails to open entirely rather than degrading.

rawshift moved its MP4 backend to mp4-atom for this and four related reasons (see #68), so this is not blocking us — filing it because it silently breaks HEVC in MP4/MOV for anyone else using that demuxer, and the fix is raising or removing one constant.

Worth reporting upstream at https://github.com/pdeljanov/Symphonia. No existing issue was found for it.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions