summaryrefslogtreecommitdiff
path: root/src/gallium/include/pipe/p_video_state.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/include/pipe/p_video_state.h')
-rw-r--r--src/gallium/include/pipe/p_video_state.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/include/pipe/p_video_state.h b/src/gallium/include/pipe/p_video_state.h
index 4da26d608c..b85f01c2b0 100644
--- a/src/gallium/include/pipe/p_video_state.h
+++ b/src/gallium/include/pipe/p_video_state.h
@@ -56,8 +56,9 @@ pipe_video_surface_reference(struct pipe_video_surface **ptr, struct pipe_video_
{
struct pipe_video_surface *old_surf = *ptr;
- if (pipe_reference((struct pipe_reference **)ptr, &surf->reference))
+ if (pipe_reference(&(*ptr)->reference, &surf->reference))
old_surf->screen->video_surface_destroy(old_surf);
+ *ptr = surf;
}
struct pipe_video_rect