summaryrefslogtreecommitdiff
path: root/gst/videoconvert
diff options
context:
space:
mode:
authorNicolas Dufresne <nicolas.dufresne@collabora.com>2017-12-10 14:59:54 -0500
committerNicolas Dufresne <nicolas.dufresne@collabora.com>2017-12-17 15:50:00 -0500
commit5affe09c4802142ed945fcbe39bca5e2f6622d94 (patch)
tree42d747cbfbd54e9d4999230e884b8f9f976a685d /gst/videoconvert
parenta8a5905ec65272e1a499d97bab2e2d4727c85112 (diff)
downloadgstreamer-plugins-base-5affe09c4802142ed945fcbe39bca5e2f6622d94.tar.gz
videoconvert: Filter-out crop meta
To passthrough crop-meta, the converter would need to allocate and convert buffers of the size of the originating buffer. This is currently made difficult by GstBaseTransform since we cannot alter the caps passed though the allocation query. We would also need to wait for the first input buffer to be received in order to make the decision around that size. So the short and safe solution is just to stop pretending we can passthrought that meta. https://bugzilla.gnome.org/show_bug.cgi?id=791412
Diffstat (limited to 'gst/videoconvert')
-rw-r--r--gst/videoconvert/gstvideoconvert.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gst/videoconvert/gstvideoconvert.c b/gst/videoconvert/gstvideoconvert.c
index 5f66c6fb4..afd1ebac1 100644
--- a/gst/videoconvert/gstvideoconvert.c
+++ b/gst/videoconvert/gstvideoconvert.c
@@ -371,7 +371,13 @@ static gboolean
gst_video_convert_filter_meta (GstBaseTransform * trans, GstQuery * query,
GType api, const GstStructure * params)
{
- /* propose all metadata upstream */
+ /* This element cannot passthrough the crop meta, because it would convert the
+ * wrong sub-region of the image, and worst, our output image may not be large
+ * enough for the crop to be applied later */
+ if (api == GST_VIDEO_CROP_META_API_TYPE)
+ return FALSE;
+
+ /* propose all other metadata upstream */
return TRUE;
}