[0.11] gst-plugins-base: videofilter: use caps of the allocation query
Wim Taymans
wtay at kemper.freedesktop.org
Mon Jan 2 07:14:51 PST 2012
Module: gst-plugins-base
Branch: 0.11
Commit: 2f3cf3a7eeea409b1cdfa1b39b3486289a72ded4
URL: http://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=2f3cf3a7eeea409b1cdfa1b39b3486289a72ded4
Author: Wim Taymans <wim.taymans at collabora.co.uk>
Date: Mon Jan 2 16:13:51 2012 +0100
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.
---
gst-libs/gst/video/gstvideofilter.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/gst-libs/gst/video/gstvideofilter.c b/gst-libs/gst/video/gstvideofilter.c
index c883dc9..af363c9 100644
--- a/gst-libs/gst/video/gstvideofilter.c
+++ b/gst-libs/gst/video/gstvideofilter.c
@@ -56,6 +56,7 @@ static gboolean
gst_video_filter_propose_allocation (GstBaseTransform * trans, GstQuery * query)
{
GstVideoFilter *filter = GST_VIDEO_FILTER_CAST (trans);
+ GstVideoInfo info;
GstBufferPool *pool;
GstCaps *caps;
gboolean need_pool;
@@ -63,7 +64,13 @@ gst_video_filter_propose_allocation (GstBaseTransform * trans, GstQuery * query)
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) {
GstStructure *structure;
More information about the gstreamer-commits
mailing list