From: Thiago Santos Date: Tue, 1 May 2012 16:28:33 +0000 (-0300) Subject: wrappercamerabinsrc: prevent caps renegotiation loop X-Git-Tag: 1.19.3~507^2~15607 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9cd017258104f5527e8b9620d33637986e3183a4;p=platform%2Fupstream%2Fgstreamer.git wrappercamerabinsrc: prevent caps renegotiation loop Only set the zoom capsfilter caps when the new caps are different, preventing a caps renegotiation loop. --- diff --git a/gst/camerabin2/gstwrappercamerabinsrc.c b/gst/camerabin2/gstwrappercamerabinsrc.c index 0b28109e90..7d2c795480 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);