Loading services/camera/libcameraservice/device3/Camera3StreamSplitter.cpp +6 −0 Original line number Diff line number Diff line Loading @@ -473,6 +473,12 @@ status_t Camera3StreamSplitter::attachBufferToOutputs(ANativeWindowBuffer* anb, mMutex.unlock(); res = gbp->attachBuffer(&slot, gb); mMutex.lock(); //During buffer attach 'mMutex' is not held which makes the removal of //"gbp" possible. Check whether this is the case and continue. if (gbp.get() == nullptr) { res = OK; continue; } if (res != OK) { SP_LOGE("%s: Cannot attachBuffer from GraphicBufferProducer %p: %s (%d)", __FUNCTION__, gbp.get(), strerror(-res), res); Loading services/camera/libcameraservice/device3/deprecated/DeprecatedCamera3StreamSplitter.cpp +6 −5 Original line number Diff line number Diff line Loading @@ -459,6 +459,12 @@ status_t DeprecatedCamera3StreamSplitter::attachBufferToOutputs( mMutex.unlock(); res = gbp->attachBuffer(&slot, gb); mMutex.lock(); // During buffer attach 'mMutex' is not held which makes the removal of //"gbp" possible. Check whether this is the case and continue. if (gbp.get() == nullptr) { res = OK; continue; } if (res != OK) { SP_LOGE("%s: Cannot attachBuffer from GraphicBufferProducer %p: %s (%d)", __FUNCTION__, gbp.get(), strerror(-res), res); Loading @@ -470,11 +476,6 @@ status_t DeprecatedCamera3StreamSplitter::attachBufferToOutputs( __FUNCTION__, slot, BufferQueue::NUM_BUFFER_SLOTS); return BAD_VALUE; } // During buffer attach 'mMutex' is not held which makes the removal of //"gbp" possible. Check whether this is the case and continue. if (mOutputSlots[gbp] == nullptr) { continue; } auto& outputSlots = *mOutputSlots[gbp]; if (static_cast<size_t>(slot + 1) > outputSlots.size()) { outputSlots.resize(slot + 1); Loading Loading
services/camera/libcameraservice/device3/Camera3StreamSplitter.cpp +6 −0 Original line number Diff line number Diff line Loading @@ -473,6 +473,12 @@ status_t Camera3StreamSplitter::attachBufferToOutputs(ANativeWindowBuffer* anb, mMutex.unlock(); res = gbp->attachBuffer(&slot, gb); mMutex.lock(); //During buffer attach 'mMutex' is not held which makes the removal of //"gbp" possible. Check whether this is the case and continue. if (gbp.get() == nullptr) { res = OK; continue; } if (res != OK) { SP_LOGE("%s: Cannot attachBuffer from GraphicBufferProducer %p: %s (%d)", __FUNCTION__, gbp.get(), strerror(-res), res); Loading
services/camera/libcameraservice/device3/deprecated/DeprecatedCamera3StreamSplitter.cpp +6 −5 Original line number Diff line number Diff line Loading @@ -459,6 +459,12 @@ status_t DeprecatedCamera3StreamSplitter::attachBufferToOutputs( mMutex.unlock(); res = gbp->attachBuffer(&slot, gb); mMutex.lock(); // During buffer attach 'mMutex' is not held which makes the removal of //"gbp" possible. Check whether this is the case and continue. if (gbp.get() == nullptr) { res = OK; continue; } if (res != OK) { SP_LOGE("%s: Cannot attachBuffer from GraphicBufferProducer %p: %s (%d)", __FUNCTION__, gbp.get(), strerror(-res), res); Loading @@ -470,11 +476,6 @@ status_t DeprecatedCamera3StreamSplitter::attachBufferToOutputs( __FUNCTION__, slot, BufferQueue::NUM_BUFFER_SLOTS); return BAD_VALUE; } // During buffer attach 'mMutex' is not held which makes the removal of //"gbp" possible. Check whether this is the case and continue. if (mOutputSlots[gbp] == nullptr) { continue; } auto& outputSlots = *mOutputSlots[gbp]; if (static_cast<size_t>(slot + 1) > outputSlots.size()) { outputSlots.resize(slot + 1); Loading