Skip to content

Commit

Permalink
va: Re-add drm_state and fd checks to VA_DRM_GetDriverNames
Browse files Browse the repository at this point in the history
Apps like gstreamer will crash on WSL without this check, which
existed before but was removed in commit f097811

Signed-off-by: Sil Vilerino <[email protected]>
  • Loading branch information
sivileri authored and dvrogozh committed Feb 15, 2024
1 parent df1272c commit eeebe59
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions va/drm/va_drm_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ VA_DRM_GetDriverNames(VADriverContextP ctx, char **drivers, unsigned *num_driver
char *drm_driver;
unsigned count = 0;

if (!drm_state || drm_state->fd < 0)
return VA_STATUS_ERROR_INVALID_DISPLAY;

drm_driver = va_DRM_GetDrmDriverName(drm_state->fd);
if (!drm_driver)
return VA_STATUS_ERROR_UNKNOWN;
Expand Down

0 comments on commit eeebe59

Please sign in to comment.