frontends/va: fix gst videotestsrc h264 enc fail issue.
authorRuijing Dong <ruijing.dong@amd.com>
Thu, 8 Dec 2022 21:10:14 +0000 (16:10 -0500)
committerRuijing Dong <ruijing.dong@amd.com>
Fri, 9 Dec 2022 14:31:11 +0000 (09:31 -0500)
commita73e86e0a5eb58e2f25f7b7419a78c122cc5ab1a
treee282530f8b7e3297b6f0fd4fd67ffd7c9cf00690
parentee10a5f7a694ae642fdbc29239650ef4c8c84c7b
frontends/va: fix gst videotestsrc h264 enc fail issue.

problem:
when doing "gst-launch-1.0 -v videotestsrc num-buffer=10 !
   vaapih264enc ! fakeink"

The command will fail due to gst will fetch the first
available supported format in the list, it becomes P010_LE
due to the commit in

[0b02db3007]
frontends/va: fixed av1 decoding 10bit ffmpeg output YUV issue

fix:
move the P010_LE code block to the end of the function, the sequence
of the supported formats restored to its original.

cc: mesa-stable

Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20242>
src/gallium/frontends/va/surface.c