From ee3613da1ed5f8c53c29cd5dad287d3ab24fc6cb Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 20 Aug 2012 16:13:00 +0200 Subject: [PATCH] X11: add unpadded width/height as videometa We need to add the real width/height as the values in the video metadata instead of the padded values. --- sys/ximage/ximagepool.c | 5 +++-- sys/xvimage/xvimagepool.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/sys/ximage/ximagepool.c b/sys/ximage/ximagepool.c index decdbaf..86b3529 100644 --- a/sys/ximage/ximagepool.c +++ b/sys/ximage/ximagepool.c @@ -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; diff --git a/sys/xvimage/xvimagepool.c b/sys/xvimage/xvimagepool.c index 00a7c31..c8e0672 100644 --- a/sys/xvimage/xvimagepool.c +++ b/sys/xvimage/xvimagepool.c @@ -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; -- 2.7.4