After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 310747 - [ximagesrc] Segfaults when using a bpp != 32
[ximagesrc] Segfaults when using a bpp != 32
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins
0.8.x
Other Linux
: Normal critical
: 0.8.12
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-07-18 12:07 UTC by Luca Ognibene
Modified: 2005-10-21 16:29 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
first patch (3.57 KB, patch)
2005-07-19 21:04 UTC, Luca Ognibene
none Details | Review

Description Luca Ognibene 2005-07-18 12:07:43 UTC
ximagesrc segfaults when trying to blend the X cursor over the frame if the bpp
of your X server is different than 32 (i've tested with 16). 
This: 
composite_pixel ((guchar *) & (((guint32 *) image->ximage->data)[j *
                      s->width + i]),
              (guchar *) & (((guint32 *) cursor_image->pixels)[(j -
                          cy) * cursor_image->width + (i - cx)]));
is correct only if every pixel is 32 bit wide. s/guint32/guint16 to make it
works with 16bpp. 
The function "composite_pixel" should also support different bpp and different
masks.

If anyone is faster than me i'll take a look ASAP.
Comment 1 Luca Ognibene 2005-07-19 21:04:38 UTC
Created attachment 49427 [details] [review]
first patch

First patch, needs to be tested on a X server with bpp != 16
* add support for 8/16/32 bpp
* support different masks
* fix a bug in finding X cursor dimension
* enjoy

I'll try to test better the patch whenever possible.. but i don't know if i'll
have time soon :(
Comment 2 Luca Ognibene 2005-09-17 08:05:02 UTC
already fixed..