Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mp4dump decodes senc box incorrectly for non-constant IV #960

Open
stevemayhew opened this issue May 16, 2024 · 0 comments
Open

mp4dump decodes senc box incorrectly for non-constant IV #960

stevemayhew opened this issue May 16, 2024 · 0 comments

Comments

@stevemayhew
Copy link

ISO/IEC 23001 spec section 7.2 specifies:

InitializationVector SHALL conform to the definition specified in 9.2. Only one Per_ Sample_IV_Size SHALL be used within a file or Per_Sample_IV_Size SHALL be zero when a sample is unencrypted or a Constant IV is in use. Selection of InitializationVector values SHOULD follow the recommendations of 9.2.

The value should be inherited from the tenc box:

[moov] size=8+911
  [mvhd] size=12+96
...
                [schi] size=8+32
                  [tenc] size=12+20
                    default_isProtected = 1
                    default_Per_Sample_IV_Size = 8

But later in the dump you see that the code guesses (incorrectly) that the value is 0:

[moof] size=8+9781
[mfhd] size=12+4
sequence number = 17494866
[traf] size=8+9757
...
( 0) 3393
[senc] size=12+6400, flags=2
sample info count = 180
IV Size (inferred) = 0
sample info entries:
( 0)
info = []
sub entries:
( 0) bytes_of_clear_data = 515, bytes_of_encrypted_data = 67438087
( 1)


This leads to bogus values for the sample entry table
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant