Skip to content

Commit

Permalink
vadumpcaps: handle drivers that don't return any drm format modifiers
Browse files Browse the repository at this point in the history
The AMD vaapi driver is one particular example.

Fixes fhvwy#4.
  • Loading branch information
philipl committed Sep 23, 2022
1 parent 792c27f commit f3ce0dc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions vadumpcaps.c
Original file line number Diff line number Diff line change
Expand Up @@ -1124,8 +1124,9 @@ static void dump_surface_attributes(VADisplay display,
const VADRMFormatModifierList *fml =
attr_list[i].value.value.p;
start_array("drm_format_modifiers");
for (int j = 0; j < fml->num_modifiers; j++)
print_integer(NULL, fml->modifiers[j]);
if (fml)
for (int j = 0; j < fml->num_modifiers; j++)
print_integer(NULL, fml->modifiers[j]);
end_array();
}
break;
Expand Down

0 comments on commit f3ce0dc

Please sign in to comment.