summaryrefslogtreecommitdiff
path: root/gst/dvdspu
diff options
context:
space:
mode:
authorVincent Penquerc'h <vincent.penquerch@collabora.co.uk>2011-08-22 16:52:13 +0100
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2011-08-23 10:15:27 +0200
commitc437541791bfeac0c7972c6402a50f69b7a2b041 (patch)
tree513506849d74728d3d6628029e319f9a4c3c64a7 /gst/dvdspu
parent6edff4837894b68aa53ddea1075d08073f6b8f35 (diff)
dvdspu: do not clear out high bits from display area
http://dvd.sourceforge.net/spu_notes does not mention that high bits are to be masked, and not clearing them makes a sample work, where clearing them yielded left > right. History does not shed any light, as tracing this code's origin shows the same bitmasks being there in 2007 when it was imported. https://bugzilla.gnome.org/show_bug.cgi?id=620119
Diffstat (limited to 'gst/dvdspu')
-rw-r--r--gst/dvdspu/gstspu-vobsub.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gst/dvdspu/gstspu-vobsub.c b/gst/dvdspu/gstspu-vobsub.c
index 1757feb705..0a2380c9eb 100644
--- a/gst/dvdspu/gstspu-vobsub.c
+++ b/gst/dvdspu/gstspu-vobsub.c
@@ -187,10 +187,10 @@ gst_dvd_spu_exec_cmd_blk (GstDVDSpu * dvdspu, guint8 * data, guint8 * end)
if (G_UNLIKELY (data + 7 >= end))
return; /* Invalid SET_DAREA cmd at the end of the blk */
- r->top = ((data[4] & 0x3f) << 4) | ((data[5] & 0xe0) >> 4);
- r->left = ((data[1] & 0x3f) << 4) | ((data[2] & 0xf0) >> 4);
- r->right = ((data[2] & 0x03) << 8) | data[3];
- r->bottom = ((data[5] & 0x03) << 8) | data[6];
+ r->top = ((data[4] & 0xff) << 4) | ((data[5] & 0xf0) >> 4);
+ r->left = ((data[1] & 0xff) << 4) | ((data[2] & 0xf0) >> 4);
+ r->right = ((data[2] & 0x0f) << 8) | data[3];
+ r->bottom = ((data[5] & 0x0f) << 8) | data[6];
GST_DEBUG_OBJECT (dvdspu,
" Set Display Area top %u left %u bottom %u right %u", r->top,