videofilter: use caps of the allocation query

Use the caps from the allocation query to propose a video bufferpool instead of
our own negotiated caps.
This commit is contained in:
Wim Taymans 2012-01-02 16:13:51 +01:00
parent 8a9a0bf6da
commit 2f3cf3a7ee

View file

@ -56,6 +56,7 @@ static gboolean
gst_video_filter_propose_allocation (GstBaseTransform * trans, GstQuery * query) gst_video_filter_propose_allocation (GstBaseTransform * trans, GstQuery * query)
{ {
GstVideoFilter *filter = GST_VIDEO_FILTER_CAST (trans); GstVideoFilter *filter = GST_VIDEO_FILTER_CAST (trans);
GstVideoInfo info;
GstBufferPool *pool; GstBufferPool *pool;
GstCaps *caps; GstCaps *caps;
gboolean need_pool; gboolean need_pool;
@ -63,7 +64,13 @@ gst_video_filter_propose_allocation (GstBaseTransform * trans, GstQuery * query)
gst_query_parse_allocation (query, &caps, &need_pool); gst_query_parse_allocation (query, &caps, &need_pool);
size = GST_VIDEO_INFO_SIZE (&filter->in_info); if (caps == NULL)
return FALSE;
if (!gst_video_info_from_caps (&info, caps))
return FALSE;
size = GST_VIDEO_INFO_SIZE (&info);
if (need_pool) { if (need_pool) {
GstStructure *structure; GstStructure *structure;