From c00aee043508f53fb38cf6a221300aa9ecef7ce2 Mon Sep 17 00:00:00 2001 From: westyao Date: Thu, 14 Aug 2025 15:54:58 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E8=AF=B4=E6=98=8E?= =?UTF-8?q?=E3=80=91fix=20notify=20eos=20Signed-off-by:=20westyao=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../colorspace_converter_video_impl.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/framework/algorithm/colorspace_converter_video/colorspace_converter_video_impl.cpp b/framework/algorithm/colorspace_converter_video/colorspace_converter_video_impl.cpp index 3a3f813..8f81ea8 100644 --- a/framework/algorithm/colorspace_converter_video/colorspace_converter_video_impl.cpp +++ b/framework/algorithm/colorspace_converter_video/colorspace_converter_video_impl.cpp @@ -686,6 +686,7 @@ void ColorSpaceConverterVideoImpl::DoTask() if (inputBuffer->bufferFlag == CSCV_BUFFER_FLAG_EOS) { { std::unique_lock lockOnBq(renderQueMutex_); + outputBuffer->bufferFlag = CSCV_BUFFER_FLAG_EOS; renderBufferAvilMap_.emplace(outputBuffer->memory->GetSeqNum(), outputBuffer); } @@ -727,6 +728,11 @@ int32_t ColorSpaceConverterVideoImpl::ReleaseOutputBuffer(uint32_t index, bool r renderBufferAvilMap_.erase(search); lockRenderQue.unlock(); + CHECK_AND_RETURN_RET_LOG(buffer, VPE_ALGO_ERR_INVALID_VAL, "Buffer is nullptr"); + if (buffer->bufferFlag == CSCV_BUFFER_FLAG_EOS) { + return VPE_ALGO_ERR_OK; + } + if (render) { flushCfg_.timestamp = buffer->timestamp; flushCfg_.damage.w = buffer->memory->GetWidth(); @@ -761,6 +767,7 @@ int32_t ColorSpaceConverterVideoImpl::NotifyEos() std::shared_ptr buf = std::make_shared(); buf->bufferFlag = CSCV_BUFFER_FLAG_EOS; inputBufferAvilQue_.push(buf); + VPE_LOGI("Push EOS frame"); cvTaskStart_.notify_all(); -- Gitee