summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorU. Artie Eoff <ullysses.a.eoff@intel.com>2020-03-05 13:22:23 -0800
committerTim-Philipp Müller <tim@centricular.com>2020-03-06 12:22:31 +0000
commit73fe04896a7c67cf276558856d692ee74cdd550b (patch)
treee73bc4cbadb19cce7d742bef827b9781b1cd154f
parentb3a56797d1027557fa0f0a78527116e8768c6d08 (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
-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 680dff70..5182d143 100644
--- a/gst/vaapi/gstvaapivideobufferpool.c
+++ b/gst/vaapi/gstvaapivideobufferpool.c
@@ -253,7 +253,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");