waylandsink: Update video info size to buffer size
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Wed, 22 Nov 2017 04:17:14 +0000 (23:17 -0500)
committerNicolas Dufresne <nicolas.dufresne@collabora.com>
Sat, 25 Nov 2017 19:59:03 +0000 (14:59 -0500)
We where setting the size to the first memory size, this may be
too small in case we received a buffer with multiple memory.

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

ext/wayland/gstwaylandsink.c

index c059c04..82f48f4 100644 (file)
@@ -684,7 +684,7 @@ gst_wayland_sink_show_frame (GstVideoSink * vsink, GstBuffer * buffer)
       sink->video_info.offset[i] = vmeta->offset[i];
       sink->video_info.stride[i] = vmeta->stride[i];
     }
-    sink->video_info.size = mem->size;
+    sink->video_info.size = gst_buffer_get_size (buffer);
   }
 
   GST_LOG_OBJECT (sink, "buffer %p does not have a wl_buffer from our "