Skip to content

Conversation

dsaedtler
Copy link
Contributor

Description

Changes NAL type for caption/bpm SEIs from prefix to suffix.

Motivation and Context

We add the SEIs at the end of the packet, so making them prefix NALs is not spec compliant. This causes errors with some decoders.

See 7.4.2.4.4 Order of NAL units and coded pictures and their association to access units in the H.265 specification:

When any VPS NAL units, SPS NAL units, PPS NAL units, prefix SEI NAL units, NAL units with nal_unit_type
in the range of RSV_NVCL41..RSV_NVCL44, or NAL units with nal_unit_type in the range of
UNSPEC48..UNSPEC55 are present, they shall not follow the last VCL NAL unit of the access unit.

How Has This Been Tested?

Streamed with captions, no longer crashes playback on Qualcomm phones, yay.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • My code has been run through clang-format.
  • I have read the contributing document.
  • My code is not on the master branch.
  • The code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

@dsaedtler dsaedtler changed the title Rodney/suffix nal Fix NAL type for HEVC caption/BPM SEIs Sep 24, 2025
@derrod derrod added the Bug Fix Non-breaking change which fixes an issue label Sep 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Fix Non-breaking change which fixes an issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants