st/vdpau: invalidate the handles on destruction
authorChristian König <christian.koenig@amd.com>
Thu, 23 May 2013 17:17:19 +0000 (19:17 +0200)
committerChristian König <christian.koenig@amd.com>
Mon, 27 May 2013 16:18:32 +0000 (18:18 +0200)
Fixes a problem with xbmc when switching channels.

Signed-off-by: Christian König <christian.koenig@amd.com>
src/gallium/state_trackers/vdpau/decode.c
src/gallium/state_trackers/vdpau/device.c
src/gallium/state_trackers/vdpau/surface.c

index 61b10e0db335d614bb7f779f87bcf11f7c220370..2ffd8dd29f9293f4e33d65d93fb95a0b8e148171 100644 (file)
@@ -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;
index c530f431644ee693194186d40219a9c299a44171..a829c2754a708959c00fbb1e32b80d9c4db088f0 100644 (file)
@@ -166,6 +166,7 @@ vlVdpDeviceDestroy(VdpDevice device)
    dev->context->destroy(dev->context);
    vl_screen_destroy(dev->vscreen);
 
+   vlRemoveDataHTAB(device);
    FREE(dev);
    vlDestroyHTAB();
 
index ad56125e0cea1be814bc9dcb671eff3a3353ec21..135eb85e8d09d9ffc680c769a1f83e444d700ca2 100644 (file)
@@ -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;
 }