From: Olivier CrĂȘte Date: Mon, 15 Apr 2013 23:53:28 +0000 (-0400) Subject: v4l2src: Disable renegotiation in the negotiate method X-Git-Tag: 1.1.1~191 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b5a9ed20e1018741a4f1ac511f3e11c564aac410;p=platform%2Fupstream%2Fgst-plugins-good.git v4l2src: Disable renegotiation in the negotiate method This way, we don't block the initial negotiation. Thanks to Jeremy Whiting for doing all the testing. https://bugzilla.gnome.org/show_bug.cgi?id=695981 --- diff --git a/sys/v4l2/gstv4l2src.c b/sys/v4l2/gstv4l2src.c index 70512e84f..28ab86aad 100644 --- a/sys/v4l2/gstv4l2src.c +++ b/sys/v4l2/gstv4l2src.c @@ -307,11 +307,20 @@ gst_v4l2src_fixate (GstBaseSrc * basesrc, GstCaps * caps) static gboolean gst_v4l2src_negotiate (GstBaseSrc * basesrc) { + GstV4l2Src *v4l2src; + GstV4l2Object *obj; GstCaps *thiscaps; GstCaps *caps = NULL; GstCaps *peercaps = NULL; gboolean result = FALSE; + v4l2src = GST_V4L2SRC (basesrc); + obj = v4l2src->v4l2object; + + /* We don't allow renegotiation, just return TRUE in that case */ + if (GST_V4L2_IS_ACTIVE (obj)) + return TRUE; + /* first see what is possible on our source pad */ thiscaps = gst_pad_query_caps (GST_BASE_SRC_PAD (basesrc), NULL); GST_DEBUG_OBJECT (basesrc, "caps of src: %" GST_PTR_FORMAT, thiscaps);