summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gallium/state_trackers/omx/entrypoint.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/gallium/state_trackers/omx/entrypoint.c b/src/gallium/state_trackers/omx/entrypoint.c
index dd72b296de2..da9ca104d93 100644
--- a/src/gallium/state_trackers/omx/entrypoint.c
+++ b/src/gallium/state_trackers/omx/entrypoint.c
@@ -119,14 +119,13 @@ void omx_put_screen(void)
{
pipe_mutex_lock(omx_lock);
if ((--omx_usecount) == 0) {
- if (omx_render_node) {
- vl_drm_screen_destroy(omx_screen);
+ omx_screen->destroy(omx_screen);
+ omx_screen = NULL;
+
+ if (omx_render_node)
close(drm_fd);
- } else {
- vl_screen_destroy(omx_screen);
+ else
XCloseDisplay(omx_display);
- }
- omx_screen = NULL;
}
pipe_mutex_unlock(omx_lock);
}