X11: add unpadded width/height as videometa
authorWim Taymans <wim.taymans@collabora.co.uk>
Mon, 20 Aug 2012 14:13:00 +0000 (16:13 +0200)
committerWim Taymans <wim.taymans@collabora.co.uk>
Mon, 20 Aug 2012 14:13:00 +0000 (16:13 +0200)
We need to add the real width/height as the values in the video metadata instead
of the padded values.

sys/ximage/ximagepool.c
sys/xvimage/xvimagepool.c

index decdbaf..86b3529 100644 (file)
@@ -589,8 +589,9 @@ ximage_buffer_pool_alloc (GstBufferPool * pool, GstBuffer ** buffer,
     GST_DEBUG_OBJECT (pool, "adding GstVideoMeta");
     /* these are just the defaults for now */
     gst_buffer_add_video_meta_full (ximage, GST_VIDEO_FRAME_FLAG_NONE,
-        GST_VIDEO_INFO_FORMAT (info), priv->padded_width, priv->padded_height,
-        GST_VIDEO_INFO_N_PLANES (info), info->offset, info->stride);
+        GST_VIDEO_INFO_FORMAT (info), GST_VIDEO_INFO_WIDTH (info),
+        GST_VIDEO_INFO_HEIGHT (info), GST_VIDEO_INFO_N_PLANES (info),
+        info->offset, info->stride);
   }
   *buffer = ximage;
 
index 00a7c31..c8e0672 100644 (file)
@@ -638,8 +638,9 @@ xvimage_buffer_pool_alloc (GstBufferPool * pool, GstBuffer ** buffer,
   if (priv->add_metavideo) {
     GST_DEBUG_OBJECT (pool, "adding GstVideoMeta");
     gst_buffer_add_video_meta_full (xvimage, GST_VIDEO_FRAME_FLAG_NONE,
-        GST_VIDEO_INFO_FORMAT (info), priv->padded_width, priv->padded_height,
-        GST_VIDEO_INFO_N_PLANES (info), info->offset, info->stride);
+        GST_VIDEO_INFO_FORMAT (info), GST_VIDEO_INFO_WIDTH (info),
+        GST_VIDEO_INFO_HEIGHT (info), GST_VIDEO_INFO_N_PLANES (info),
+        info->offset, info->stride);
   }
 
   *buffer = xvimage;