summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiago Santos <thiago.sousa.santos@collabora.com>2012-10-25 00:44:34 -0300
committerThiago Santos <thiago.sousa.santos@collabora.com>2012-10-25 11:36:58 -0300
commit8bae00021c6ea393a0cbecd2eea5a96c6277135f (patch)
tree6cf532da4134ae1923ca372ef2ab3dba214bb7ed
parent56049825525096e30c9bb574c6762b5c4547a7f2 (diff)
imagefreeze: the new get_caps already does the filter intersection
It should be faster to pass the caps to intersect as the filter caps, rather than using NULL and intersecting 'manually' later. https://bugzilla.gnome.org/show_bug.cgi?id=686837
-rw-r--r--gst/imagefreeze/gstimagefreeze.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/gst/imagefreeze/gstimagefreeze.c b/gst/imagefreeze/gstimagefreeze.c
index 43150475a..7c56d0e54 100644
--- a/gst/imagefreeze/gstimagefreeze.c
+++ b/gst/imagefreeze/gstimagefreeze.c
@@ -196,17 +196,11 @@ gst_image_freeze_sink_setcaps (GstImageFreeze * self, GstCaps * caps)
intersection = othercaps = NULL;
/* 3. Intersect with downstream peer caps */
- othercaps = gst_pad_peer_query_caps (self->srcpad, NULL);
- if (othercaps) {
- intersection = gst_caps_intersect (caps, othercaps);
- GST_DEBUG_OBJECT (pad, "Intersecting: %" GST_PTR_FORMAT, caps);
- GST_DEBUG_OBJECT (pad, "with: %" GST_PTR_FORMAT, othercaps);
- GST_DEBUG_OBJECT (pad, "gave: %" GST_PTR_FORMAT, intersection);
- gst_caps_unref (othercaps);
- gst_caps_unref (caps);
- caps = intersection;
- intersection = othercaps = NULL;
- }
+ othercaps = gst_pad_peer_query_caps (self->srcpad, caps);
+ GST_DEBUG_OBJECT (pad, "Peer query resulted: %" GST_PTR_FORMAT, othercaps);
+ gst_caps_unref (caps);
+ caps = othercaps;
+ othercaps = NULL;
/* 4. For every candidate check if it's accepted downstream
* and fixate framerate to nearest 25/1 */