Loading media/libstagefright/MediaCodec.cpp +26 −21 Original line number Diff line number Diff line Loading @@ -4099,8 +4099,8 @@ void MediaCodec::onMessageReceived(const sp<AMessage> &msg) { break; } if (asyncNotify != nullptr) { if (mSurface != NULL) { bool forceSync = false; if (asyncNotify != nullptr && mSurface != NULL) { if (!mReleaseSurface) { uint64_t usage = 0; if (mSurface->getConsumerUsage(&usage) != OK) { Loading @@ -4118,7 +4118,10 @@ void MediaCodec::onMessageReceived(const sp<AMessage> &msg) { if (err == OK) { (void)disconnectFromSurface(); mSurface = mReleaseSurface->getSurface(); } } else { // We were not able to switch the surface, so force // synchronous release. forceSync = true; } } } Loading @@ -4142,8 +4145,10 @@ void MediaCodec::onMessageReceived(const sp<AMessage> &msg) { } if (asyncNotify != nullptr) { if (!forceSync) { mResourceManagerProxy->markClientForPendingRemoval(); postPendingRepliesAndDeferredMessages("kWhatRelease:async"); } asyncNotifyPost.clear(); mAsyncReleaseCompleteNotification = asyncNotify; } Loading Loading
media/libstagefright/MediaCodec.cpp +26 −21 Original line number Diff line number Diff line Loading @@ -4099,8 +4099,8 @@ void MediaCodec::onMessageReceived(const sp<AMessage> &msg) { break; } if (asyncNotify != nullptr) { if (mSurface != NULL) { bool forceSync = false; if (asyncNotify != nullptr && mSurface != NULL) { if (!mReleaseSurface) { uint64_t usage = 0; if (mSurface->getConsumerUsage(&usage) != OK) { Loading @@ -4118,7 +4118,10 @@ void MediaCodec::onMessageReceived(const sp<AMessage> &msg) { if (err == OK) { (void)disconnectFromSurface(); mSurface = mReleaseSurface->getSurface(); } } else { // We were not able to switch the surface, so force // synchronous release. forceSync = true; } } } Loading @@ -4142,8 +4145,10 @@ void MediaCodec::onMessageReceived(const sp<AMessage> &msg) { } if (asyncNotify != nullptr) { if (!forceSync) { mResourceManagerProxy->markClientForPendingRemoval(); postPendingRepliesAndDeferredMessages("kWhatRelease:async"); } asyncNotifyPost.clear(); mAsyncReleaseCompleteNotification = asyncNotify; } Loading