videofilter: improve propose_allocation
When we are in passthrough, call the parent implementation. Otherwise we have to suggest allocation parameters ourselves.
This commit is contained in:
parent
17715ac8ae
commit
18e45a8a5f
@ -53,7 +53,8 @@ G_DEFINE_ABSTRACT_TYPE (GstVideoFilter, gst_video_filter,
|
|||||||
/* Answer the allocation query downstream. This is only called for
|
/* Answer the allocation query downstream. This is only called for
|
||||||
* non-passthrough cases */
|
* non-passthrough cases */
|
||||||
static gboolean
|
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);
|
GstVideoFilter *filter = GST_VIDEO_FILTER_CAST (trans);
|
||||||
GstVideoInfo info;
|
GstVideoInfo info;
|
||||||
@ -62,6 +63,10 @@ gst_video_filter_propose_allocation (GstBaseTransform * trans, GstQuery * query)
|
|||||||
gboolean need_pool;
|
gboolean need_pool;
|
||||||
guint size;
|
guint size;
|
||||||
|
|
||||||
|
if (passthrough)
|
||||||
|
return GST_BASE_TRANSFORM_CLASS (parent_class)->propose_allocation (trans,
|
||||||
|
passthrough, query);
|
||||||
|
|
||||||
gst_query_parse_allocation (query, &caps, &need_pool);
|
gst_query_parse_allocation (query, &caps, &need_pool);
|
||||||
|
|
||||||
if (caps == NULL)
|
if (caps == NULL)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user