wpesrc: Initialize key event to 0
authorOlivier CrĂȘte <olivier.crete@collabora.com>
Mon, 11 Apr 2022 20:54:05 +0000 (15:54 -0500)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Tue, 12 Apr 2022 11:52:34 +0000 (11:52 +0000)
Otherwise, WebKit sees random modifiers

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2156>

subprojects/gst-plugins-bad/ext/wpe/gstwpevideosrc.cpp

index c1e452e..693a859 100644 (file)
@@ -588,7 +588,8 @@ gst_wpe_video_src_event (GstBaseSrc * base_src, GstEvent * event)
              hardware-level information, not high-level keysym strings */
           uint32_t keysym =
               (uint32_t) xkb_keysym_from_name (key, XKB_KEYSYM_NO_FLAGS);
-          struct wpe_input_keyboard_event wpe_event;
+          struct wpe_input_keyboard_event wpe_event = { 0 };
+
           wpe_event.key_code = keysym;
           wpe_event.pressed =
               gst_navigation_event_get_type (event) ==