summaryrefslogtreecommitdiff
path: root/src/sna
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-04-29 13:51:33 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2014-04-29 13:56:34 +0100
commit2fd1a05ac50ac4ba7cf09225f9133a8141aef302 (patch)
tree67438a5fff99792e2e8c4e82a95e29e050bf85fb /src/sna
parent41a573c15ca1a1e775a2060be117374a5bc6f9b9 (diff)
sna/video: Initialise pitch before query
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna')
-rw-r--r--src/sna/sna_video_overlay.c1
-rw-r--r--src/sna/sna_video_sprite.c6
2 files changed, 5 insertions, 2 deletions
diff --git a/src/sna/sna_video_overlay.c b/src/sna/sna_video_overlay.c
index 72b290a5..e0af9191 100644
--- a/src/sna/sna_video_overlay.c
+++ b/src/sna/sna_video_overlay.c
@@ -642,6 +642,7 @@ sna_video_overlay_query(ClientPtr client,
case FOURCC_XVMC:
*h = (*h + 1) & ~1;
sna_video_frame_init(video, format->id, *w, *h, &frame);
+ sna_video_frame_set_rotation(video, &frame, RR_Rotate_0);
size = sizeof(uint32_t);
if (pitches) {
pitches[0] = frame.pitch[1];
diff --git a/src/sna/sna_video_sprite.c b/src/sna/sna_video_sprite.c
index 0a1c545f..de04638d 100644
--- a/src/sna/sna_video_sprite.c
+++ b/src/sna/sna_video_sprite.c
@@ -557,9 +557,11 @@ static int sna_video_sprite_query(ClientPtr client,
switch (format->id) {
case FOURCC_RGB888:
case FOURCC_RGB565:
- sna_video_frame_init(video, format->id, *w, *h, &frame);
- if (pitches)
+ if (pitches) {
+ sna_video_frame_init(video, format->id, *w, *h, &frame);
+ sna_video_frame_set_rotation(video, &frame, RR_Rotate_0);
pitches[0] = frame.pitch[0];
+ }
size = 4;
break;