patchSpsNalColorToBt709

Patches colour_primaries / transfer_characteristics / matrix_coefficients to BT.709 (1, 1, 1) in a raw SPS NAL ByteBuffer. Works for both: - A full csd-0 buffer containing one or more NAL units (recording) - A single raw SPS NAL ByteBuffer (streaming, passed to onVideoInfo)

Return

Patched ByteBuffer (new allocation), or original if patching failed/not needed

Parameters

spsData

ByteBuffer containing the NAL bytes

isHevc

true for H.265/HEVC, false for H.264/AVC