Make vaapi_recorder take onwership of the fd and close it at destroy
time.
weston_log("[libva recorder] initialized\n");
} else {
vaapi_recorder_destroy(output->recorder);
- /* FIXME: close drm fd passed to recorder */
output->recorder = NULL;
output->base.disable_planes--;
#define PROFILE_IDC_HIGH 100
struct vaapi_recorder {
- int output_fd;
+ int drm_fd, output_fd;
int width, height;
int frame_count;
r->width = width;
r->height = height;
+ r->drm_fd = drm_fd;
flags = O_WRONLY | O_CREAT | O_TRUNC | O_CLOEXEC;
r->output_fd = open(filename, flags, 0644);
vaTerminate(r->va_dpy);
close(r->output_fd);
+ close(r->drm_fd);
free(r);
}