frontends/va: add num_temporal_layers check
authorBoyuan Zhang <boyuan.zhang@amd.com>
Thu, 19 Aug 2021 02:47:05 +0000 (22:47 -0400)
committerMarge Bot <eric+marge@anholt.net>
Thu, 19 Aug 2021 14:25:09 +0000 (14:25 +0000)
commit8e5e70bb3de7f75ab1b039e2cec2975ba59e4af7
tree2b91ef560a765c3543b572d3123017313ecec39d
parent4081516b3e4288524359c5e664abbf6f38fcb1b9
frontends/va: add num_temporal_layers check

Fixes: 51935d59

temporal_id check is valid only if the num_temporal_layers is set (>0).
When num_temporal_layers is 0, we shouldn't check temporal_id and return
error.

Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-by: Thong Thai <thong.thai@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12463>
src/gallium/frontends/va/picture_h264_enc.c