summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/vdpau/mixer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/state_trackers/vdpau/mixer.c')
-rw-r--r--src/gallium/state_trackers/vdpau/mixer.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/vdpau/mixer.c b/src/gallium/state_trackers/vdpau/mixer.c
index e6bfb8cbc43..a724aa5b254 100644
--- a/src/gallium/state_trackers/vdpau/mixer.c
+++ b/src/gallium/state_trackers/vdpau/mixer.c
@@ -60,7 +60,7 @@ vlVdpVideoMixerCreate(VdpDevice device,
if (!vmixer)
return VDP_STATUS_RESOURCES;
- vmixer->device = dev;
+ DeviceReference(&vmixer->device, dev);
pipe_mutex_lock(dev->mutex);
@@ -160,6 +160,7 @@ no_params:
no_handle:
vl_compositor_cleanup_state(&vmixer->cstate);
pipe_mutex_unlock(dev->mutex);
+ DeviceReference(&vmixer->device, NULL);
FREE(vmixer);
return ret;
}
@@ -199,6 +200,7 @@ vlVdpVideoMixerDestroy(VdpVideoMixer mixer)
FREE(vmixer->sharpness.filter);
}
pipe_mutex_unlock(vmixer->device->mutex);
+ DeviceReference(&vmixer->device, NULL);
FREE(vmixer);