diff --git a/src/gallium/auxiliary/vl/vl_video_buffer.c b/src/gallium/auxiliary/vl/vl_video_buffer.c index 55057475b49..f2e086fdfaf 100644 --- a/src/gallium/auxiliary/vl/vl_video_buffer.c +++ b/src/gallium/auxiliary/vl/vl_video_buffer.c @@ -328,6 +328,11 @@ vl_video_buffer_sampler_view_components(struct pipe_video_buffer *buffer) } } + assert(component != 0); + + for (i = component; i < VL_NUM_COMPONENTS; ++i) + pipe_sampler_view_reference(&buf->sampler_view_components[i], buf->sampler_view_components[component - 1]); + return buf->sampler_view_components; error: