st/omx: use the vl_screen dispatch

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Emil Velikov 2015-11-06 22:45:38 +00:00
parent 32094979f7
commit 9eb109f4d3
1 changed files with 6 additions and 7 deletions

View File

@ -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);
close(drm_fd);
} else {
vl_screen_destroy(omx_screen);
XCloseDisplay(omx_display);
}
omx_screen->destroy(omx_screen);
omx_screen = NULL;
if (omx_render_node)
close(drm_fd);
else
XCloseDisplay(omx_display);
}
pipe_mutex_unlock(omx_lock);
}