[Bug 791140] New: ximagesink, xvimagesink: fix incorrect type conversion of pointer position

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Sat Dec 2 17:20:12 UTC 2017


https://bugzilla.gnome.org/show_bug.cgi?id=791140

            Bug ID: 791140
           Summary: ximagesink, xvimagesink: fix incorrect type conversion
                    of pointer position
    Classification: Platform
           Product: GStreamer
           Version: git master
                OS: Linux
            Status: NEW
          Severity: minor
          Priority: Normal
         Component: gst-plugins-base
          Assignee: gstreamer-bugs at lists.freedesktop.org
          Reporter: akinobu.mita at gmail.com
        QA Contact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---

Created attachment 364823
  --> https://bugzilla.gnome.org/attachment.cgi?id=364823&action=edit
proposal patch to fix this bug

I'm currently playing with modified ximagesink that does XGrabPointer()
in order to receive the mouse events occurred outside of the window and
send them to the navigation interface.

The pointer positions usually have positive coordinates, but it could
be negative with that change.

When the ximagesink handles XEvent that contains a negative pointer
coordinate, it incorrectly generates the GstEvent that contains an
extremely large positive pointer coordinate.

This is because the negative pointer position in XEvent is incorrectly
converted from signed to unsigned and passed as an argument to
gst_navigation_send_mouse_event() which causes implicit conversion from
integer to double.  So the pointer position in the received XEvent and
generated GstEvent are completely different.

This potential problem does not seem to be a real problem with unmodified
ximagesink but there is no reason to leave it as is.  This also fixes
xvimagesink that has the same potential problem.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list