Skip to content

Commit

Permalink
release lock earlier in vdpVideoSurfaceDestroy
Browse files Browse the repository at this point in the history
  • Loading branch information
i-rinat committed Feb 28, 2016
1 parent e10ef7a commit 597df5d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/api-video-surface.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,11 @@ vdpVideoSurfaceDestroy(VdpVideoSurface surface)

glx_ctx_push_thread_local(deviceData);
glDeleteTextures(1, &videoSurfData->tex_id);

GLenum gl_error = glGetError();
glx_ctx_pop();

if (GL_NO_ERROR != gl_error) {
traceError("error (%s): gl error %d\n", __func__, gl_error);
glx_ctx_pop();
handle_release(surface);
return VDP_STATUS_ERROR;
}
Expand All @@ -162,7 +161,6 @@ vdpVideoSurfaceDestroy(VdpVideoSurface surface)
free(videoSurfData->u_plane);
// do not free videoSurfData->v_plane, it's just pointer into the middle of u_plane

glx_ctx_pop();
unref_device(deviceData);
handle_expunge(surface);
free(videoSurfData);
Expand Down

0 comments on commit 597df5d

Please sign in to comment.