Merge "cas: add flag for PES header extraction"

gugelfrei
TreeHugger Robot 6 years ago committed by Android (Google) Code Review
commit 8954d94d24

@ -347,6 +347,9 @@ ssize_t ClearKeyCasSession::decrypt(
return ERROR_CAS_CANNOT_HANDLE;
}
scramblingControl = (DescramblerPlugin::ScramblingControl)
(scramblingControl & DescramblerPlugin::kScrambling_Mask_Key);
AES_KEY contentKey;
if (scramblingControl != DescramblerPlugin::kScrambling_Unscrambled) {

@ -27,6 +27,7 @@
#include <binder/MemoryDealer.h>
#include <cutils/native_handle.h>
#include <hidlmemory/FrameworkUtils.h>
#include <media/cas/DescramblerAPI.h>
#include <media/stagefright/foundation/ABitReader.h>
#include <media/stagefright/foundation/ABuffer.h>
#include <media/stagefright/foundation/ADebug.h>
@ -1387,6 +1388,9 @@ status_t ATSParser::Stream::flushScrambled(SyncEvent *event) {
uint32_t sctrl = tsScramblingControl != 0 ?
tsScramblingControl : pesScramblingControl;
if (mQueue->isScrambled()) {
sctrl |= DescramblerPlugin::kScrambling_Flag_PesHeader;
}
// Perform the 1st pass descrambling if needed
if (descrambleBytes > 0) {

Loading…
Cancel
Save