Make PSSH parser more robust.
(This is a merge of http://go/wvgerrit/12700 from the Widevine CDM repository.) Adds unit tests which cover several cases, including five which are fixed in this patch: * Find a Widevine PSSH after a PSSH with non-zero flags. (We have no control over another provider's abuse of the flags field, so we should not give up if such a PSSH appears before ours.) * Find a Widevine PSSH after a v1 PSSH. (CENC now specifies a general v1 format. We don't have to support it directly in the CDM, but we do have to skip it gracefully.) * Find a Widevine PSSH after a non-PSSH box. (This would be unusual input, but we can easily recover from it.) * Parse a PSSH box with a size field of 0, which means "the rest of the buffer." (This would be unusual input, too, but is technically allowed for any MP4 box.) * Parse a v1 Widevine PSSH box, ignoring the new fields we don't need. Bug: 19288007 Change-Id: I355df9e34ba4d53cc02e8501de965a0d193ee554
This commit is contained in:
@@ -17,6 +17,7 @@ adb shell /system/bin/libwvdrmdrmplugin_test
|
||||
adb shell /system/bin/cdm_engine_test
|
||||
adb shell /system/bin/cdm_session_unittest
|
||||
adb shell /system/bin/file_store_unittest
|
||||
adb shell /system/bin/initialization_data_unittest
|
||||
adb shell /system/bin/device_files_unittest
|
||||
adb shell /system/bin/timer_unittest
|
||||
adb shell LD_LIBRARY_PATH=/system/vendor/lib/mediadrm/ /system/bin/libwvdrmengine_test
|
||||
|
||||
Reference in New Issue
Block a user