From: Wim Taymans Date: Wed, 22 Feb 2012 14:27:59 +0000 (+0100) Subject: videofilter: improve propose_allocation X-Git-Tag: 1.19.3~511^2~6758 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=18e45a8a5fc2d55bd3e58d86a6e9f97d303d4f3e;p=platform%2Fupstream%2Fgstreamer.git videofilter: improve propose_allocation When we are in passthrough, call the parent implementation. Otherwise we have to suggest allocation parameters ourselves. --- diff --git a/gst-libs/gst/video/gstvideofilter.c b/gst-libs/gst/video/gstvideofilter.c index 7b5c9d3..1b03c7a 100644 --- a/gst-libs/gst/video/gstvideofilter.c +++ b/gst-libs/gst/video/gstvideofilter.c @@ -53,7 +53,8 @@ G_DEFINE_ABSTRACT_TYPE (GstVideoFilter, gst_video_filter, /* Answer the allocation query downstream. This is only called for * non-passthrough cases */ static gboolean -gst_video_filter_propose_allocation (GstBaseTransform * trans, GstQuery * query) +gst_video_filter_propose_allocation (GstBaseTransform * trans, + gboolean passthrough, GstQuery * query) { GstVideoFilter *filter = GST_VIDEO_FILTER_CAST (trans); GstVideoInfo info; @@ -62,6 +63,10 @@ gst_video_filter_propose_allocation (GstBaseTransform * trans, GstQuery * query) gboolean need_pool; guint size; + if (passthrough) + return GST_BASE_TRANSFORM_CLASS (parent_class)->propose_allocation (trans, + passthrough, query); + gst_query_parse_allocation (query, &caps, &need_pool); if (caps == NULL)