diff options
author | Zaheer Abbas Merali <zaheerabbas@merali.org> | 2006-03-31 15:21:35 +0000 |
---|---|---|
committer | Zaheer Abbas Merali <zaheerabbas@merali.org> | 2006-03-31 15:21:35 +0000 |
commit | c03f02f50fa9c357435de2bb14501e40f1a184c9 (patch) | |
tree | f0e1592f8dfe6404d5245e53a30b820dd2b8d4f4 /sys/ximage/ximageutil.c | |
parent | 9b064ff8d8f76bcf77cd3e0452acfda5ef6c547c (diff) |
sys/ximagesrc/: Fix ximagesrc so a) the cursor doesnt trail and b) there are no yellow rectangles with the cursor
Original commit message from CVS:
2006-03-31 Zaheer Abbas Merali <zaheerabbas at merali dot org>
* sys/ximagesrc/ximagesrc.c: (composite_pixel),
(gst_ximagesrc_ximage_get), (gst_ximagesrc_set_property),
(gst_ximagesrc_get_caps), (gst_ximagesrc_class_init):
* sys/ximagesrc/ximagesrc.h:
* sys/ximagesrc/ximageutil.c: (ximageutil_xcontext_get):
* sys/ximagesrc/ximageutil.h:
Fix ximagesrc so a) the cursor doesnt trail and b) there are no
yellow rectangles with the cursor
Diffstat (limited to 'sys/ximage/ximageutil.c')
-rw-r--r-- | sys/ximage/ximageutil.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/sys/ximage/ximageutil.c b/sys/ximage/ximageutil.c index 1928449a..2c1149bc 100644 --- a/sys/ximage/ximageutil.c +++ b/sys/ximage/ximageutil.c @@ -204,13 +204,13 @@ ximageutil_xcontext_get (GstElement * parent, const gchar * display_name) if ((xcontext->bpp == 24 || xcontext->bpp == 32) && xcontext->endianness == G_LITTLE_ENDIAN) { xcontext->endianness = G_BIG_ENDIAN; - xcontext->visual->red_mask = GUINT32_TO_BE (xcontext->visual->red_mask); - xcontext->visual->green_mask = GUINT32_TO_BE (xcontext->visual->green_mask); - xcontext->visual->blue_mask = GUINT32_TO_BE (xcontext->visual->blue_mask); + xcontext->r_mask_output = GUINT32_TO_BE (xcontext->visual->red_mask); + xcontext->g_mask_output = GUINT32_TO_BE (xcontext->visual->green_mask); + xcontext->b_mask_output = GUINT32_TO_BE (xcontext->visual->blue_mask); if (xcontext->bpp == 24) { - xcontext->visual->red_mask >>= 8; - xcontext->visual->green_mask >>= 8; - xcontext->visual->blue_mask >>= 8; + xcontext->r_mask_output >>= 8; + xcontext->g_mask_output >>= 8; + xcontext->b_mask_output >>= 8; } } @@ -283,7 +283,8 @@ ximageutil_calculate_pixel_aspect_ratio (GstXContext * xcontext) GST_DEBUG ("Decided on index %d (%d/%d)", index, par[index][0], par[index][1]); - g_free (xcontext->par); + if (xcontext->par) + g_free (xcontext->par); xcontext->par = g_new0 (GValue, 1); g_value_init (xcontext->par, GST_TYPE_FRACTION); gst_value_set_fraction (xcontext->par, par[index][0], par[index][1]); |