FairPlay SPC v3 documentation mismatch: payload length field size vs sample code

Hi, I’ve identified a discrepancy between the FairPlay Streaming SPC v3 documentation and the provided Swift reference implementation regarding the SPC payload length field.

Documentation states:

The SPC V3 structure defines:

SPC payload length: 4 bytes

However, in Apple’s Swift sample implementation:

// Move local offset by 12 to adjust for padding

localOffset += 12

spcContainer.spcDataSize = Int(try readBigEndianU32(spc, localOffset))

This indicates:

A 16-byte field (12 bytes padding + 4-byte length)

This behavior also matches the SPC sample provided in the FairPlay Streaming SDK (sample_spc_v3.b64 ).

00000003 // spc version
00000000 // reserved

....

00000000000000000000000000000f40 // spc payload length (16 bytes)


Could you please confirm the correct implementation?

Thanks

Thanks for pointing this out! The documentation is missing a 12B reserved field before the SPC payload length for SPC V3. The code and sample are correct. Will get this corrected in the documentation.

FairPlay SPC v3 documentation mismatch: payload length field size vs sample code
 
 
Q