diff options
Diffstat (limited to 'src/gallium/state_trackers/vdpau/decode.c')
-rw-r--r-- | src/gallium/state_trackers/vdpau/decode.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/vdpau/decode.c b/src/gallium/state_trackers/vdpau/decode.c index 1e5f81e22e7..767d3114125 100644 --- a/src/gallium/state_trackers/vdpau/decode.c +++ b/src/gallium/state_trackers/vdpau/decode.c @@ -110,7 +110,7 @@ vlVdpDecoderCreate(VdpDevice device, return VDP_STATUS_RESOURCES; } - vldecoder->device = dev; + DeviceReference(&vldecoder->device, dev); templat.entrypoint = PIPE_VIDEO_ENTRYPOINT_BITSTREAM; templat.chroma_format = PIPE_VIDEO_CHROMA_FORMAT_420; @@ -141,6 +141,7 @@ error_handle: error_decoder: pipe_mutex_unlock(dev->mutex); + DeviceReference(&vldecoder->device, NULL); FREE(vldecoder); return ret; } @@ -163,6 +164,7 @@ vlVdpDecoderDestroy(VdpDecoder decoder) pipe_mutex_destroy(vldecoder->mutex); vlRemoveDataHTAB(decoder); + DeviceReference(&vldecoder->device, NULL); FREE(vldecoder); return VDP_STATUS_OK; |