fix Segmentation fault with --va-derive=on (github #5)

This commit is contained in:
JerryXiao 2023-09-21 14:05:16 +08:00
parent 843d79cb64
commit 586d14e848
Signed by: Jerry
GPG key ID: 22618F758B5BE2E5
2 changed files with 1 additions and 1 deletions

View file

@ -14,7 +14,6 @@ steps:
trigger:
branch:
- master
- dev
event:
exclude:

1
va.c
View file

@ -294,6 +294,7 @@ int va_init() {
if ((s = vaDeriveImage(va->dpy, va->surface_id, va->image)) == VA_STATUS_SUCCESS) {
char found = 0;
for (int i = 0; i < KMSVNC_ARRAY_ELEMENTS(format_to_try); i++) {
if (format_to_try[i].fmt == NULL) continue;
if (va->image->format.fourcc == format_to_try[i].fmt->fourcc) {
found = 1;
break;