summaryrefslogtreecommitdiff
path: root/gst
diff options
context:
space:
mode:
authorU. Artie Eoff <ullysses.a.eoff@intel.com>2020-03-05 13:22:23 -0800
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>2020-03-06 12:08:44 +0000
commitda008baac29c3319cc13c0c3b20ce3669820458d (patch)
tree1d240fdf50e4225f0a99442722fb17e7e58ecbae /gst
parent385892dd32050c6c27760c0fdeb4748590f49c36 (diff)
vaapivideobufferpool: force video meta if sizes are different
The strides and offsets could be the same, but the allocation size might be different (e.g. alignment). Thus, ensure we also set the flag to copy from VA memory to system memory when alloc size differs. Fixes #243
Diffstat (limited to 'gst')
-rw-r--r--gst/vaapi/gstvaapivideobufferpool.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gst/vaapi/gstvaapivideobufferpool.c b/gst/vaapi/gstvaapivideobufferpool.c
index 082cf91e..2de92ea5 100644
--- a/gst/vaapi/gstvaapivideobufferpool.c
+++ b/gst/vaapi/gstvaapivideobufferpool.c
@@ -250,7 +250,9 @@ gst_vaapi_video_buffer_pool_set_config (GstBufferPool * pool,
if (GST_VIDEO_INFO_PLANE_OFFSET (&new_allocation_vinfo, i) !=
GST_VIDEO_INFO_PLANE_OFFSET (&priv->vmeta_vinfo, i) ||
GST_VIDEO_INFO_PLANE_STRIDE (&new_allocation_vinfo, i) !=
- GST_VIDEO_INFO_PLANE_STRIDE (&priv->vmeta_vinfo, i)) {
+ GST_VIDEO_INFO_PLANE_STRIDE (&priv->vmeta_vinfo, i) ||
+ GST_VIDEO_INFO_SIZE (&new_allocation_vinfo) !=
+ GST_VIDEO_INFO_SIZE (&priv->vmeta_vinfo)) {
priv->options |= GST_VAAPI_VIDEO_BUFFER_POOL_OPTION_VIDEO_META;
priv->forced_video_meta = TRUE;
GST_INFO_OBJECT (base_pool, "adding unrequested video meta");