0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-19 20:32:15 +02:00

obs-ffmpeg: Close VAAPI device on vaInitialize fail

On some systems (eg. mine), VAAPI fails on vaInitialize. Valgrind was
able to spot that the device was not being closed, and it appears to
have been correct. This fixes a memory leak.
This commit is contained in:
tt2468 2024-06-19 17:54:39 -07:00
parent 6457d7b429
commit 6c389271b3

View File

@ -99,6 +99,7 @@ VADisplay vaapi_open_device(int *fd, const char *device_path,
if (va_status != VA_STATUS_SUCCESS) {
blog(LOG_ERROR, "VAAPI: Failed to initialize display in %s",
func_name);
vaapi_close_device(fd, va_dpy);
return NULL;
}