summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHe Junyan <junyan.he@intel.com>2021-02-04 15:05:55 +0800
committerTim-Philipp Müller <tim@centricular.com>2021-02-16 11:23:34 +0000
commit1fb6750e83dbe59e5b02952e49e547022f52d021 (patch)
tree79df700ecaedc3c58dd8b6b65517e9ef5f4244e0
parent0b5c0a36a6fd923f0b2bb11580fd355fb13ce021 (diff)
downloadgstreamer-vaapi-1fb6750e83dbe59e5b02952e49e547022f52d021.tar.gz
plugins: postproc: Fix a problem of propose_allocation when passthrough.
We should query the downstream element to answer a precise allocation query when the passthrough mode is enabled. The current way still decides the allocation by the postproc itself. The pipeline such as: gst-launch-1.0 -v filesrc location=xxx.264 ! h264parse ! vaapih264dec ! \ vaapipostproc ! fakevideosink silent=false sync=true will lose some info such as the GST_VIDEO_META_API_TYPE. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/414>
-rw-r--r--gst/vaapi/gstvaapipostproc.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gst/vaapi/gstvaapipostproc.c b/gst/vaapi/gstvaapipostproc.c
index 5f7d9cd8..052ee4fa 100644
--- a/gst/vaapi/gstvaapipostproc.c
+++ b/gst/vaapi/gstvaapipostproc.c
@@ -1801,6 +1801,13 @@ gst_vaapipostproc_propose_allocation (GstBaseTransform * trans,
gint allocation_width, allocation_height;
gint negotiated_width, negotiated_height;
+ /* passthrough query, we just bypass to the peer */
+ if (decide_query == NULL) {
+ return GST_BASE_TRANSFORM_CLASS
+ (gst_vaapipostproc_parent_class)->propose_allocation (trans,
+ decide_query, query);
+ }
+
/* advertise to upstream that we can handle crop meta */
if (decide_query)
gst_query_add_allocation_meta (query, GST_VIDEO_CROP_META_API_TYPE, NULL);