summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/vl
diff options
context:
space:
mode:
authorChristian König <[email protected]>2012-01-30 17:51:53 +0100
committerChristian König <[email protected]>2012-02-06 10:34:57 +0100
commit4ccae0dfaaee5f773fb356d052e6605ea0d99c2c (patch)
treefbaeff6f576dea76ca7356e367873bc1fad4d5d0 /src/gallium/auxiliary/vl
parent1f4a853b1e4691400ab832c589b044b659c20c06 (diff)
vl/video_buffer: fix height of interlaced video buffers
Signed-off-by: Christian König <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/vl')
-rw-r--r--src/gallium/auxiliary/vl/vl_video_buffer.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/vl/vl_video_buffer.c b/src/gallium/auxiliary/vl/vl_video_buffer.c
index 021e81e8de1..249124f42f4 100644
--- a/src/gallium/auxiliary/vl/vl_video_buffer.c
+++ b/src/gallium/auxiliary/vl/vl_video_buffer.c
@@ -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 *