From: Christian König Date: Thu, 23 May 2013 17:17:19 +0000 (+0200) Subject: st/vdpau: invalidate the handles on destruction X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8ea34fa0e8e2c5ac7583777cdb91f3abe8ce9f8c;p=mesa.git st/vdpau: invalidate the handles on destruction Fixes a problem with xbmc when switching channels. Signed-off-by: Christian König --- diff --git a/src/gallium/state_trackers/vdpau/decode.c b/src/gallium/state_trackers/vdpau/decode.c index 61b10e0db33..2ffd8dd29f9 100644 --- a/src/gallium/state_trackers/vdpau/decode.c +++ b/src/gallium/state_trackers/vdpau/decode.c @@ -139,6 +139,7 @@ vlVdpDecoderDestroy(VdpDecoder decoder) vldecoder->decoder->destroy(vldecoder->decoder); pipe_mutex_unlock(vldecoder->device->mutex); + vlRemoveDataHTAB(decoder); FREE(vldecoder); return VDP_STATUS_OK; diff --git a/src/gallium/state_trackers/vdpau/device.c b/src/gallium/state_trackers/vdpau/device.c index c530f431644..a829c2754a7 100644 --- a/src/gallium/state_trackers/vdpau/device.c +++ b/src/gallium/state_trackers/vdpau/device.c @@ -166,6 +166,7 @@ vlVdpDeviceDestroy(VdpDevice device) dev->context->destroy(dev->context); vl_screen_destroy(dev->vscreen); + vlRemoveDataHTAB(device); FREE(dev); vlDestroyHTAB(); diff --git a/src/gallium/state_trackers/vdpau/surface.c b/src/gallium/state_trackers/vdpau/surface.c index ad56125e0ce..135eb85e8d0 100644 --- a/src/gallium/state_trackers/vdpau/surface.c +++ b/src/gallium/state_trackers/vdpau/surface.c @@ -132,7 +132,9 @@ vlVdpVideoSurfaceDestroy(VdpVideoSurface surface) p_surf->video_buffer->destroy(p_surf->video_buffer); pipe_mutex_unlock(p_surf->device->mutex); + vlRemoveDataHTAB(surface); FREE(p_surf); + return VDP_STATUS_OK; }