Commit 3b2885fe authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

XCB-XVideo: no need to detach segment explicitly before disconnection

The X server will do as part of garbage collection - as it does for our
window, graphic context, or if VLC crashes.
parent 4a590357
...@@ -260,11 +260,8 @@ void PictureResourceFree (picture_resource_t *res, xcb_connection_t *conn) ...@@ -260,11 +260,8 @@ void PictureResourceFree (picture_resource_t *res, xcb_connection_t *conn)
{ {
xcb_shm_seg_t segment = res->p_sys->segment; xcb_shm_seg_t segment = res->p_sys->segment;
if (segment != 0) if (conn != NULL && segment != 0)
{
assert (conn != NULL);
xcb_shm_detach (conn, segment); xcb_shm_detach (conn, segment);
}
shmdt (res->p->p_pixels); shmdt (res->p->p_pixels);
} }
...@@ -529,7 +529,7 @@ static void Close (vlc_object_t *obj) ...@@ -529,7 +529,7 @@ static void Close (vlc_object_t *obj)
if (!res->p->p_pixels) if (!res->p->p_pixels)
break; break;
PictureResourceFree (res, p_sys->conn); PictureResourceFree (res, NULL);
} }
picture_pool_Delete (p_sys->pool); picture_pool_Delete (p_sys->pool);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment