waylandsink/waylandpool: find the video format from the GstVideoInfo instead of acces...
authorGeorge Kiagiadakis <george.kiagiadakis@collabora.com>
Thu, 13 Feb 2014 09:37:01 +0000 (10:37 +0100)
committerGeorge Kiagiadakis <george.kiagiadakis@collabora.com>
Tue, 17 Jun 2014 11:51:21 +0000 (13:51 +0200)
For the sake of isolation only. The format should be the same.

ext/wayland/waylandpool.c

index 9f06e63..a591c9c 100644 (file)
@@ -25,6 +25,7 @@
 /* Object header */
 #include "gstwaylandsink.h"
 #include "wldisplay.h"
+#include "wlvideoformat.h"
 
 /* Debugging category */
 #include <gst/gstinfo.h>
@@ -244,7 +245,8 @@ gst_wayland_buffer_pool_alloc (GstBufferPool * pool, GstBuffer ** buffer,
   height = GST_VIDEO_INFO_HEIGHT (&self->info);
   stride = GST_VIDEO_INFO_PLANE_STRIDE (&self->info, 0);
   size = GST_VIDEO_INFO_SIZE (&self->info);
-  format = self->sink->format;
+  format =
+      gst_video_format_to_wayland_format (GST_VIDEO_INFO_FORMAT (&self->info));
 
   GST_DEBUG_OBJECT (self, "Allocating buffer of size %" G_GSSIZE_FORMAT
       " (%d x %d, stride %d), format %d", size, width, height, stride, format);