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.
This commit is contained in:
Wim Taymans 2012-08-20 16:13:00 +02:00
parent bc9c1685c2
commit ee3613da1e
2 changed files with 6 additions and 4 deletions

View 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;

View 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;