mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-20 11:40:10 +01:00
mediafoundation: propagate PrepareForEncode error up.
Reviewed-by: Yubo Xie <yuboxie@microsoft.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38857>
This commit is contained in:
parent
10138e5b42
commit
47dc4b90e4
3 changed files with 5 additions and 9 deletions
|
|
@ -677,6 +677,10 @@ done:
|
||||||
*ppDX12EncodeContext = pDX12EncodeContext;
|
*ppDX12EncodeContext = pDX12EncodeContext;
|
||||||
pDX12EncodeContext = nullptr;
|
pDX12EncodeContext = nullptr;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MFE_ERROR( "[dx12 hmft 0x%p] PrepareForEncode - hr=0x%x", this, hr );
|
||||||
|
}
|
||||||
SAFE_DELETE( pDX12EncodeContext );
|
SAFE_DELETE( pDX12EncodeContext );
|
||||||
SAFE_CLOSEHANDLE( hTexture );
|
SAFE_CLOSEHANDLE( hTexture );
|
||||||
return hr;
|
return hr;
|
||||||
|
|
|
||||||
|
|
@ -29,14 +29,6 @@
|
||||||
goto label; \
|
goto label; \
|
||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
#define CHECKHR_HRGOTO( hresult, newhresult, label ) \
|
|
||||||
{ \
|
|
||||||
hr = hresult; \
|
|
||||||
if( FAILED( hr ) ) \
|
|
||||||
{ \
|
|
||||||
CHECKHR_GOTO( newhresult, label ); \
|
|
||||||
} \
|
|
||||||
}
|
|
||||||
#define CHECKBOOL_GOTO( exp, err, label ) \
|
#define CHECKBOOL_GOTO( exp, err, label ) \
|
||||||
if( !( exp ) ) \
|
if( !( exp ) ) \
|
||||||
{ \
|
{ \
|
||||||
|
|
|
||||||
|
|
@ -2538,7 +2538,7 @@ CDX12EncHMFT::ProcessInput( DWORD dwInputStreamIndex, IMFSample *pSample, DWORD
|
||||||
(void) pSample->GetUINT32( MFSampleExtension_ChromaOnly, &unChromaOnly );
|
(void) pSample->GetUINT32( MFSampleExtension_ChromaOnly, &unChromaOnly );
|
||||||
|
|
||||||
// setup the source buffer
|
// setup the source buffer
|
||||||
CHECKHR_HRGOTO( PrepareForEncode( pSample, &pDX12EncodeContext ), MF_E_INVALIDMEDIATYPE, done );
|
CHECKHR_GOTO( PrepareForEncode( pSample, &pDX12EncodeContext ), done );
|
||||||
if( SUCCEEDED( GetQPMapBufferFromSampleLockHeld( pSample, &qpData, &qpSize, qpMapBuffer ) ) && qpMapBuffer )
|
if( SUCCEEDED( GetQPMapBufferFromSampleLockHeld( pSample, &qpData, &qpSize, qpMapBuffer ) ) && qpMapBuffer )
|
||||||
{
|
{
|
||||||
pDX12EncodeContext->SetPipeQPMapBufferInfo( qpData, qpSize );
|
pDX12EncodeContext->SetPipeQPMapBufferInfo( qpData, qpSize );
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue