st/vdpau: Only call is_video_format_supported hook if needed
authorMichel Dänzer <mdaenzer@redhat.com>
Tue, 18 Feb 2020 11:12:01 +0000 (12:12 +0100)
committerMichel Dänzer <michel@daenzer.net>
Wed, 19 Feb 2020 11:41:08 +0000 (12:41 +0100)
commit7e6010106fb3c4eb5436de869183e857243c1006
tree4012998a3f5dfda1f9a1c8a1928bca6209388d46
parent72154237fb720926d8453e7f43f0ec76a0ce7bb1
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: 5d5b414a7b84 "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>
src/gallium/state_trackers/vdpau/query.c