wayland client(e.g. gstwaylandsink) failed to connect to the wayland display
After the patch of weston(ae69381b compositor: avoid setting WAYLAND_DISPLAY=wayland-0), default socket name of the wayland display has been changed to 'wayland-1'. This change causes backward compatibility issues for the applications using wayland-client since it is supposed to assume the default socket name as 'wayland-0'. For example, GStreamer waylandsink shows below error.
0:00:00.083194854 13197 0x55b580038400 WARN waylandsink gstwaylandsink.c:364:gst_wayland_sink_find_display:<waylandsink0> warning: Could not initialise Wayland output
0:00:00.083201426 13197 0x55b580038400 WARN waylandsink gstwaylandsink.c:364:gst_wayland_sink_find_display:<waylandsink0> warning: Failed to create GstWlDisplay: 'Failed to connect to the wayland display '(default)'
We may change the number of below hardcoded name but it is going to cause another backward compatibility issue. Therefore, it would be better to deal with both cases.
if (name == NULL)
name = "wayland-0";