From: Nicolas Dufresne Date: Wed, 4 Dec 2013 20:09:44 +0000 (-0500) Subject: v4l2object: Move back assertions where they should be X-Git-Tag: 1.3.1~355 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5f1e47da246d48feff9ec4811d9a45aaebce7353;p=platform%2Fupstream%2Fgst-plugins-good.git v4l2object: Move back assertions where they should be https://bugzilla.gnome.org/show_bug.cgi?id=720568 --- diff --git a/sys/v4l2/gstv4l2object.c b/sys/v4l2/gstv4l2object.c index a695196..2fa80af 100644 --- a/sys/v4l2/gstv4l2object.c +++ b/sys/v4l2/gstv4l2object.c @@ -2507,6 +2507,9 @@ gst_v4l2_object_set_format (GstV4l2Object * v4l2object, GstCaps * caps) gint width, height, fps_n, fps_d, stride; gint i = 0; + GST_V4L2_CHECK_OPEN (v4l2object); + GST_V4L2_CHECK_NOT_ACTIVE (v4l2object); + if (!gst_v4l2_object_get_caps_info (v4l2object, caps, &fmtdesc, &info)) goto invalid_caps; @@ -2536,9 +2539,6 @@ gst_v4l2_object_set_format (GstV4l2Object * v4l2object, GstCaps * caps) "%" GST_FOURCC_FORMAT " stride: %d", width, height, GST_FOURCC_ARGS (pixelformat), stride); - GST_V4L2_CHECK_OPEN (v4l2object); - GST_V4L2_CHECK_NOT_ACTIVE (v4l2object); - /* MPEG-TS source cameras don't get their format set for some reason. * It looks wrong and we weren't able to track down the reason for that code * so it is disabled until someone who has an mpeg-ts camera complains...