diff options
author | Havard Graff <havard.graff@tandberg.com> | 2011-09-05 10:43:19 +0200 |
---|---|---|
committer | Tim-Philipp Müller <tim.muller@collabora.co.uk> | 2012-01-13 10:07:20 +0000 |
commit | 150403ab13dbccef653537cc62cc30a42f71d43f (patch) | |
tree | 0d4d1fa8e5d4298153f6d4a2ebfac5d97c21b88f | |
parent | e886ef8f5bcd4dc10531c74a59b3288b7baf4b45 (diff) |
v4l2src: Don't assert when the interface is not implemented.
Simply return FALSE instead.
https://bugzilla.gnome.org/show_bug.cgi?id=667817
-rw-r--r-- | sys/v4l2/gstv4l2src.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/sys/v4l2/gstv4l2src.c b/sys/v4l2/gstv4l2src.c index 023e77bee..e2175a4ec 100644 --- a/sys/v4l2/gstv4l2src.c +++ b/sys/v4l2/gstv4l2src.c @@ -95,14 +95,16 @@ gst_v4l2src_iface_supported (GstImplementsInterface * iface, GType iface_type) GstV4l2Object *v4l2object = GST_V4L2SRC (iface)->v4l2object; #ifdef HAVE_XVIDEO - g_assert (iface_type == GST_TYPE_TUNER || - iface_type == GST_TYPE_X_OVERLAY || - iface_type == GST_TYPE_COLOR_BALANCE || - iface_type == GST_TYPE_VIDEO_ORIENTATION); + if (!(iface_type == GST_TYPE_TUNER || + iface_type == GST_TYPE_X_OVERLAY || + iface_type == GST_TYPE_COLOR_BALANCE || + iface_type == GST_TYPE_VIDEO_ORIENTATION)) + return FALSE; #else - g_assert (iface_type == GST_TYPE_TUNER || - iface_type == GST_TYPE_COLOR_BALANCE || - iface_type == GST_TYPE_VIDEO_ORIENTATION); + if (!(iface_type == GST_TYPE_TUNER || + iface_type == GST_TYPE_COLOR_BALANCE || + iface_type == GST_TYPE_VIDEO_ORIENTATION)) + return FALSE; #endif if (v4l2object->video_fd == -1) |