summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/vdpau/output.c
diff options
context:
space:
mode:
authorChristian König <[email protected]>2012-03-07 14:51:46 +0100
committerChristian König <[email protected]>2012-03-09 12:44:34 +0100
commit9a3c2776acef1950a752e109eedd282a40edaf66 (patch)
tree2adff166ee1e242d2062c5ce2be4a29b5ea21300 /src/gallium/state_trackers/vdpau/output.c
parent2e5f3cdca51e08320f38089f627fd059b7ebfa99 (diff)
st/vdpau: fix two small memory leaks
Signed-off-by: Christian König <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/vdpau/output.c')
-rw-r--r--src/gallium/state_trackers/vdpau/output.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/vdpau/output.c b/src/gallium/state_trackers/vdpau/output.c
index 7e3d74d8011..5b25e63d28e 100644
--- a/src/gallium/state_trackers/vdpau/output.c
+++ b/src/gallium/state_trackers/vdpau/output.c
@@ -133,16 +133,20 @@ VdpStatus
vlVdpOutputSurfaceDestroy(VdpOutputSurface surface)
{
vlVdpOutputSurface *vlsurface;
+ struct pipe_context *pipe;
vlsurface = vlGetDataHTAB(surface);
if (!vlsurface)
return VDP_STATUS_INVALID_HANDLE;
+ pipe = vlsurface->device->context;
+
pipe_mutex_lock(vlsurface->device->mutex);
vlVdpResolveDelayedRendering(vlsurface->device, NULL, NULL);
pipe_surface_reference(&vlsurface->surface, NULL);
pipe_sampler_view_reference(&vlsurface->sampler_view, NULL);
+ pipe->screen->fence_reference(pipe->screen, &vlsurface->fence, NULL);
vl_compositor_cleanup_state(&vlsurface->cstate);
pipe_mutex_unlock(vlsurface->device->mutex);