diff --git a/_studio/shared/umc/codec/av1_dec/include/umc_av1_va_packer.h b/_studio/shared/umc/codec/av1_dec/include/umc_av1_va_packer.h index c2cf35b3..e41c050b 100644 --- a/_studio/shared/umc/codec/av1_dec/include/umc_av1_va_packer.h +++ b/_studio/shared/umc/codec/av1_dec/include/umc_av1_va_packer.h @@ -46,7 +46,7 @@ class Packer virtual ~Packer(); virtual UMC::Status GetStatusReport(void* pStatusReport, size_t size) = 0; - virtual UMC::Status SyncTask(AV1DecoderFrame * frame, void * error) = 0; + virtual UMC::Status SyncTask(int32_t index, void * error) = 0; virtual void BeginFrame() = 0; virtual void EndFrame() = 0; diff --git a/_studio/shared/umc/codec/av1_dec/include/umc_av1_va_packer_vaapi.h b/_studio/shared/umc/codec/av1_dec/include/umc_av1_va_packer_vaapi.h index a751add0..3643af34 100644 --- a/_studio/shared/umc/codec/av1_dec/include/umc_av1_va_packer_vaapi.h +++ b/_studio/shared/umc/codec/av1_dec/include/umc_av1_va_packer_vaapi.h @@ -47,12 +47,9 @@ namespace UMC_AV1_DECODER PackerVA(UMC::VideoAccelerator * va); UMC::Status GetStatusReport(void * pStatusReport, size_t size) override; - UMC::Status SyncTask(AV1DecoderFrame * frame, void * error) override + UMC::Status SyncTask(int32_t index, void * error) override { - frame->IncrementReference(); - auto sts = m_va->SyncTask(frame->GetMemID(), error); - frame->DecrementReference(); - return sts; + return m_va->SyncTask(index, error); } void BeginFrame() override; void EndFrame() override; diff --git a/_studio/shared/umc/codec/av1_dec/src/umc_av1_decoder_va.cpp b/_studio/shared/umc/codec/av1_dec/src/umc_av1_decoder_va.cpp index d24d85a2..a66dfc73 100755 --- a/_studio/shared/umc/codec/av1_dec/src/umc_av1_decoder_va.cpp +++ b/_studio/shared/umc/codec/av1_dec/src/umc_av1_decoder_va.cpp @@ -215,13 +215,14 @@ namespace UMC_AV1_DECODER { auto_guard.unlock(); { - sts = packer->SyncTask(&frame, NULL); + sts = packer->SyncTask(frame.GetMemID(), NULL); } auto_guard.lock(); } VAStatus surfErr = VA_STATUS_SUCCESS; + index = frame.GetMemID(); auto_guard.unlock(); - UMC::Status sts = packer->SyncTask(&frame, &surfErr); + UMC::Status sts = packer->SyncTask(index, &surfErr); auto_guard.lock(); frame.CompleteDecoding();