summaryrefslogtreecommitdiff
path: root/gst/camerabin2
diff options
context:
space:
mode:
authorThiago Santos <thiago.sousa.santos@collabora.com>2012-05-01 13:28:33 -0300
committerThiago Santos <thiago.sousa.santos@collabora.com>2012-05-01 15:20:49 -0300
commit9cd017258104f5527e8b9620d33637986e3183a4 (patch)
tree11010625102d5a83a08849e1a44421ce707fcb78 /gst/camerabin2
parentf08a847e8689b3216dec925d63948dca4c446e9a (diff)
downloadgstreamer-plugins-bad-9cd017258104f5527e8b9620d33637986e3183a4.tar.gz
wrappercamerabinsrc: prevent caps renegotiation loop
Only set the zoom capsfilter caps when the new caps are different, preventing a caps renegotiation loop.
Diffstat (limited to 'gst/camerabin2')
-rw-r--r--gst/camerabin2/gstwrappercamerabinsrc.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/gst/camerabin2/gstwrappercamerabinsrc.c b/gst/camerabin2/gstwrappercamerabinsrc.c
index 0b28109e9..7d2c79548 100644
--- a/gst/camerabin2/gstwrappercamerabinsrc.c
+++ b/gst/camerabin2/gstwrappercamerabinsrc.c
@@ -397,8 +397,14 @@ gst_wrapper_camera_bin_src_caps_cb (GObject * gobject, GParamSpec * pspec,
gst_base_camera_src_setup_zoom (bcamsrc);
/* Update post-zoom capsfilter */
- if (self->src_zoom_filter)
- g_object_set (G_OBJECT (self->src_zoom_filter), "caps", caps, NULL);
+ if (self->src_zoom_filter) {
+ GstCaps *filtercaps;
+
+ g_object_get (G_OBJECT (self->src_zoom_filter), "caps", &filtercaps, NULL);
+ if (!gst_caps_is_equal (filtercaps, caps))
+ g_object_set (G_OBJECT (self->src_zoom_filter), "caps", caps, NULL);
+ gst_caps_unref (filtercaps);
+ }
/* drop our ref on the caps */
gst_caps_unref (caps);