Implement "ignore_fmp4_defaultkid" parameter to "manifest_config" property #1981
+61
−28
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
the issue #1973 revealed a clear implementation problem that we have been carrying with us since the early days of this add-on
ISA uses an incorrect method to select KID/PSSH to initialize DRM
current: look MPD protection data -> init DRM by using MPD data -> but MP4 reader use MP4 init segment protection info (reasons for mismatch and broken playback of your case)
needed: look MPD protection data -> look at MP4 init seg protection info -> try init DRM by using MP4 init seg protection info (init segment should have priority, since usually its more reliable, in theory) -> then if fails (e.g. missing KID) -> try init DRM by using MPD data
This is what i was able to understand also with the help of AI
since the drm info provided by segments should have always the priority over the MPD metadata, because segment data should be more updated than the MPD
an example is the CBCS sample stream from ISASamples addon where the MPD provide PSSH/defaultKID for SD content, instead the init segment provide the PSSH/defaultKID for HD content
so using the MPD protection data means broken playback
the issue #1973 instead is a bit different
MPD provide a correct PSSH/defKID, and init segment could be also correct but in this case the license for x reason dont provide the defaut KID specified by init segment, so fails, and should be used the MPD one (we need to fallback to MPD)
Full fixing this is not trivial and require much changes, also on android side that atm i don't have a complete picture due to missing pieces in our android wrapper code
Therefore even though it's a pain shit this workaround is the only thing that i can provide in a fast way
Motivation and context
a workaround for issue #1973
a complete fix require too much changes that touch different components
and too much time is required to do it
anyway it will be my next task to do since IMO is of fundamental importance
How has this been tested?
Screenshots (if appropriate):
Types of change
Checklist: