Skip to content

Commit

Permalink
memory: additional check in synchronize (#5751)
Browse files Browse the repository at this point in the history
Co-authored-by: Miroslav Goncharenko <[email protected]>
  • Loading branch information
gfxVPLsdm and mgonchar authored Sep 1, 2023
1 parent 9a33cc1 commit a46e240
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion _studio/mfx_lib/shared/src/libmfxsw_decode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ mfxStatus MFXVideoDECODE_DecodeFrameAsync(mfxSession session, mfxBitstream *bs,
mfxAddRes = session->m_pScheduler->AddTask(task, &syncPoint);
MFX_CHECK_STS(mfxAddRes);

if (syncPoint && *surface_out && (*surface_out)->FrameInterface && !session->m_pCORE->IsExternalFrameAllocator())
if (syncPoint && *surface_out && (*surface_out)->FrameInterface && (*surface_out)->FrameInterface->Synchronize && !session->m_pCORE->IsExternalFrameAllocator())
{
MFX_CHECK_HDL((*surface_out)->FrameInterface->Context);
static_cast<mfxFrameSurfaceBaseInterface*>((*surface_out)->FrameInterface->Context)->SetSyncPoint(syncPoint);
Expand Down
2 changes: 1 addition & 1 deletion _studio/mfx_lib/shared/src/libmfxsw_decode_vp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ mfxStatus MFXVideoDECODE_VPP_DecodeFrameAsync(mfxSession session, mfxBitstream*
}
}

if (vppSyncp && vppOut->FrameInterface && !session->m_pCORE->IsExternalFrameAllocator())
if (vppSyncp && vppOut->FrameInterface && vppOut->FrameInterface->Synchronize && !session->m_pCORE->IsExternalFrameAllocator())
{
MFX_CHECK_HDL(vppOut->FrameInterface->Context);
static_cast<mfxFrameSurfaceBaseInterface*>(vppOut->FrameInterface->Context)->SetSyncPoint(vppSyncp);
Expand Down
2 changes: 1 addition & 1 deletion _studio/mfx_lib/shared/src/libmfxsw_vpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ mfxStatus MFXVideoVPP_RunFrameVPPAsync(mfxSession session, mfxFrameSurface1 *in,
syncPoint = NULL;
}

if (syncPoint && out && out->FrameInterface && !session->m_pCORE->IsExternalFrameAllocator())
if (syncPoint && out && out->FrameInterface && out->FrameInterface->Synchronize && !session->m_pCORE->IsExternalFrameAllocator())
{
MFX_CHECK_HDL(out->FrameInterface->Context);
static_cast<mfxFrameSurfaceBaseInterface*>(out->FrameInterface->Context)->SetSyncPoint(syncPoint);
Expand Down

0 comments on commit a46e240

Please sign in to comment.