hls.js icon indicating copy to clipboard operation
hls.js copied to clipboard

fix: parse PSSH box error

Open yajin2021 opened this issue 8 months ago • 0 comments

This PR will...

Parse PSSH box when 'version' is 1. PSSH box defines as follows:

aligned(8) class ProtectionSystemSpecificHeaderBox extends FullBox('pssh', version, flags=0)
{
    unsigned int(8)[16]                SystemID;
    if (version > 0)
    {
         unsigned int(32)              KID_count;
         {
             unsigned int(8)[16]       KID;
         } [KID_count];
    }
    unsigned int(32)                   DataSize;
    unsigned int(8)[DataSize]          Data;
}

Why is this Pull Request needed?

When version of PSSH box is 1, parsing value is an error.

Checklist

  • [x] changes have been done against master branch, and PR does not conflict
  • [x] new unit / functional tests have been added (whenever applicable)
  • [x] API or design changes are documented in API.md

yajin2021 avatar Jun 16 '25 04:06 yajin2021