vl/video_buffer: fix height of interlaced video buffers
authorChristian König <deathsimple@vodafone.de>
Mon, 30 Jan 2012 16:51:53 +0000 (17:51 +0100)
committerChristian König <deathsimple@vodafone.de>
Mon, 6 Feb 2012 09:34:57 +0000 (10:34 +0100)
Signed-off-by: Christian König <deathsimple@vodafone.de>
src/gallium/auxiliary/vl/vl_video_buffer.c

index 021e81e8de1efe15780833fe53d8666d83fc0776..249124f42f44a16f5a758546eb0f47cea5399e4f 100644 (file)
@@ -321,7 +321,7 @@ vl_video_buffer_create(struct pipe_context *pipe,
                        const struct pipe_video_buffer *tmpl)
 {
    const enum pipe_format *resource_formats;
-   struct pipe_video_buffer templat;
+   struct pipe_video_buffer templat, *result;
    bool pot_buffers;
 
    assert(pipe);
@@ -347,11 +347,17 @@ vl_video_buffer_create(struct pipe_context *pipe,
    if (tmpl->interlaced)
       templat.height /= 2;
 
-   return vl_video_buffer_create_ex
+   result = vl_video_buffer_create_ex
    (
       pipe, &templat, resource_formats,
       tmpl->interlaced ? 2 : 1, PIPE_USAGE_STATIC
    );
+
+
+   if (result && tmpl->interlaced)
+      result->height *= 2;
+
+   return result;
 }
 
 struct pipe_video_buffer *