Loading include/media/stagefright/ACodec.h +2 −1 Original line number Diff line number Diff line Loading @@ -125,6 +125,7 @@ private: enum { kFlagIsSecure = 1, kFlagPushBlankBuffersToNativeWindowOnShutdown = 2, }; struct BufferInfo { Loading media/libstagefright/ACodec.cpp +9 −1 Original line number Diff line number Diff line Loading @@ -1114,6 +1114,12 @@ status_t ACodec::configureCodec( ALOGV("[%s] storeMetaDataInBuffers succeeded", mComponentName.c_str()); mStoreMetaDataInOutputBuffers = true; } int32_t push; if (msg->findInt32("push-blank-buffers-on-shutdown", &push) && push != 0) { mFlags |= kFlagPushBlankBuffersToNativeWindowOnShutdown; } } if (video) { Loading Loading @@ -3584,6 +3590,7 @@ bool ACodec::UninitializedState::onAllocateComponent(const sp<AMessage> &msg) { if (componentName.endsWith(".secure")) { mCodec->mFlags |= kFlagIsSecure; mCodec->mFlags |= kFlagPushBlankBuffersToNativeWindowOnShutdown; } mCodec->mQuirks = quirks; Loading Loading @@ -4413,7 +4420,8 @@ void ACodec::ExecutingToIdleState::changeStateIfWeOwnAllBuffers() { CHECK_EQ(mCodec->freeBuffersOnPort(kPortIndexInput), (status_t)OK); CHECK_EQ(mCodec->freeBuffersOnPort(kPortIndexOutput), (status_t)OK); if (mCodec->mFlags & kFlagIsSecure && mCodec->mNativeWindow != NULL) { if ((mCodec->mFlags & kFlagPushBlankBuffersToNativeWindowOnShutdown) && mCodec->mNativeWindow != NULL) { // We push enough 1x1 blank buffers to ensure that one of // them has made it to the display. This allows the OMX // component teardown to zero out any protected buffers Loading Loading
include/media/stagefright/ACodec.h +2 −1 Original line number Diff line number Diff line Loading @@ -125,6 +125,7 @@ private: enum { kFlagIsSecure = 1, kFlagPushBlankBuffersToNativeWindowOnShutdown = 2, }; struct BufferInfo { Loading
media/libstagefright/ACodec.cpp +9 −1 Original line number Diff line number Diff line Loading @@ -1114,6 +1114,12 @@ status_t ACodec::configureCodec( ALOGV("[%s] storeMetaDataInBuffers succeeded", mComponentName.c_str()); mStoreMetaDataInOutputBuffers = true; } int32_t push; if (msg->findInt32("push-blank-buffers-on-shutdown", &push) && push != 0) { mFlags |= kFlagPushBlankBuffersToNativeWindowOnShutdown; } } if (video) { Loading Loading @@ -3584,6 +3590,7 @@ bool ACodec::UninitializedState::onAllocateComponent(const sp<AMessage> &msg) { if (componentName.endsWith(".secure")) { mCodec->mFlags |= kFlagIsSecure; mCodec->mFlags |= kFlagPushBlankBuffersToNativeWindowOnShutdown; } mCodec->mQuirks = quirks; Loading Loading @@ -4413,7 +4420,8 @@ void ACodec::ExecutingToIdleState::changeStateIfWeOwnAllBuffers() { CHECK_EQ(mCodec->freeBuffersOnPort(kPortIndexInput), (status_t)OK); CHECK_EQ(mCodec->freeBuffersOnPort(kPortIndexOutput), (status_t)OK); if (mCodec->mFlags & kFlagIsSecure && mCodec->mNativeWindow != NULL) { if ((mCodec->mFlags & kFlagPushBlankBuffersToNativeWindowOnShutdown) && mCodec->mNativeWindow != NULL) { // We push enough 1x1 blank buffers to ensure that one of // them has made it to the display. This allows the OMX // component teardown to zero out any protected buffers Loading