st/vdpau: Only call is_video_format_supported hook if needed
Namely only if *is_supported is true, otherwise the hook result can't
affect it.
Avoids
../src/gallium/state_trackers/vdpau/vdpau_private.h:138: FormatYCBCRToPipe: Assertion `0' failed.
with assertions enabled.
Fixes: 5d5b414a7b "st/vdpau: fix chroma_format handling in
VideoSurfaceQueryGetPutBitsYCbCrCapabilities"
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3848>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3848>
This commit is contained in:
committed by
Michel Dänzer
parent
72154237fb
commit
7e6010106f
@@ -154,13 +154,13 @@ vlVdpVideoSurfaceQueryGetPutBitsYCbCrCapabilities(VdpDevice device, VdpChromaTyp
|
||||
break;
|
||||
}
|
||||
|
||||
*is_supported &= pscreen->is_video_format_supported
|
||||
(
|
||||
pscreen,
|
||||
FormatYCBCRToPipe(bits_ycbcr_format),
|
||||
PIPE_VIDEO_PROFILE_UNKNOWN,
|
||||
PIPE_VIDEO_ENTRYPOINT_BITSTREAM
|
||||
);
|
||||
if (*is_supported &&
|
||||
!pscreen->is_video_format_supported(pscreen,
|
||||
FormatYCBCRToPipe(bits_ycbcr_format),
|
||||
PIPE_VIDEO_PROFILE_UNKNOWN,
|
||||
PIPE_VIDEO_ENTRYPOINT_BITSTREAM)) {
|
||||
*is_supported = false;
|
||||
}
|
||||
mtx_unlock(&dev->mutex);
|
||||
|
||||
return VDP_STATUS_OK;
|
||||
|
||||
Reference in New Issue
Block a user