Am 17.08.2013 23:51, schrieb Emil Velikov:
Signed-off-by: Emil Velikov <emil.l.veli...@gmail.com>

Reviewed-by: Christian König <christian.koe...@amd.com>

---
  src/gallium/auxiliary/vl/vl_video_buffer.c | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/gallium/auxiliary/vl/vl_video_buffer.c 
b/src/gallium/auxiliary/vl/vl_video_buffer.c
index 22e618a..9264194 100644
--- a/src/gallium/auxiliary/vl/vl_video_buffer.c
+++ b/src/gallium/auxiliary/vl/vl_video_buffer.c
@@ -258,7 +258,7 @@ vl_video_buffer_destroy(struct pipe_video_buffer *buffer)
        pipe_resource_reference(&buf->resources[i], NULL);
     }
- for (i = 0; i < VL_NUM_COMPONENTS * 2; ++i)
+   for (i = 0; i < VL_MAX_SURFACES; ++i)
        pipe_surface_reference(&buf->surfaces[i], NULL);
vl_video_buffer_set_associated_data(buffer, NULL, NULL, NULL);
@@ -364,7 +364,7 @@ vl_video_buffer_surfaces(struct pipe_video_buffer *buffer)
     array_size = buffer->interlaced ? 2 : 1;
     for (i = 0, surf = 0; i < VL_NUM_COMPONENTS; ++i) {
        for (j = 0; j < array_size; ++j, ++surf) {
-         assert(surf < (VL_NUM_COMPONENTS * 2));
+         assert(surf < VL_MAX_SURFACES);
if (!buf->resources[i]) {
              pipe_surface_reference(&buf->surfaces[surf], NULL);
@@ -385,7 +385,7 @@ vl_video_buffer_surfaces(struct pipe_video_buffer *buffer)
     return buf->surfaces;
error:
-   for (i = 0; i < (VL_NUM_COMPONENTS * 2); ++i )
+   for (i = 0; i < VL_MAX_SURFACES; ++i )
        pipe_surface_reference(&buf->surfaces[i], NULL);
return NULL;

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to