mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 09:55:36 +00:00
d3d11videoprocessor: Fix wrong input/output supportability check
The flag argument of ID3D11VideoProcessorEnumerator::CheckVideoProcessorFormat method is output value, not input. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1726>
This commit is contained in:
parent
8f96361c81
commit
b62867ecc8
1 changed files with 15 additions and 10 deletions
|
@ -177,20 +177,25 @@ gst_d3d11_video_processor_supports_format (GstD3D11VideoProcessor *
|
|||
self, DXGI_FORMAT format, gboolean is_input)
|
||||
{
|
||||
HRESULT hr;
|
||||
UINT flag;
|
||||
|
||||
if (is_input) {
|
||||
/* D3D11_VIDEO_PROCESSOR_FORMAT_SUPPORT_INPUT, missing in mingw header */
|
||||
flag = 1;
|
||||
} else {
|
||||
/* D3D11_VIDEO_PROCESSOR_FORMAT_SUPPORT_OUTPUT, missing in mingw header */
|
||||
flag = 2;
|
||||
}
|
||||
UINT flag = 0;
|
||||
|
||||
hr = ID3D11VideoProcessorEnumerator_CheckVideoProcessorFormat
|
||||
(self->enumerator, format, &flag);
|
||||
|
||||
return gst_d3d11_result (hr, self->device);
|
||||
if (!gst_d3d11_result (hr, self->device))
|
||||
return FALSE;
|
||||
|
||||
if (is_input) {
|
||||
/* D3D11_VIDEO_PROCESSOR_FORMAT_SUPPORT_INPUT, missing in mingw header */
|
||||
if ((flag & 0x1) != 0)
|
||||
return TRUE;
|
||||
} else {
|
||||
/* D3D11_VIDEO_PROCESSOR_FORMAT_SUPPORT_OUTPUT, missing in mingw header */
|
||||
if ((flag & 0x2) != 0)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
gboolean
|
||||
|
|
Loading…
Reference in a new issue