summaryrefslogtreecommitdiff
path: root/sys/v4l2/gstv4l2.c
diff options
context:
space:
mode:
authorNicolas Dufresne <nicolas.dufresne@collabora.com>2017-07-27 10:51:07 -0400
committerNicolas Dufresne <nicolas.dufresne@collabora.com>2017-07-27 12:12:00 -0400
commit1762c2e7138c8550ba83bf02c229b1cf9c9af59c (patch)
tree88a1fe29356b05b6083520de190e6d43a6aa068e /sys/v4l2/gstv4l2.c
parent4b8d0a294a60e1433ea60731c6ea4e911fc42f1c (diff)
v4l2: Ignore register issue and keep probing
Don't stop registering the other dynamic plugins if one registration fails.
Diffstat (limited to 'sys/v4l2/gstv4l2.c')
-rw-r--r--sys/v4l2/gstv4l2.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/sys/v4l2/gstv4l2.c b/sys/v4l2/gstv4l2.c
index 9c84735ae..1a504c5c7 100644
--- a/sys/v4l2/gstv4l2.c
+++ b/sys/v4l2/gstv4l2.c
@@ -119,7 +119,6 @@ gst_v4l2_probe_and_register (GstPlugin * plugin)
GstV4l2Iterator *it;
gint video_fd = -1;
struct v4l2_capability vcap;
- gboolean ret = TRUE;
guint32 device_caps;
it = gst_v4l2_iterator_new ();
@@ -183,23 +182,21 @@ gst_v4l2_probe_and_register (GstPlugin * plugin)
basename = g_path_get_basename (it->device_path);
- if (gst_v4l2_is_video_dec (sink_caps, src_caps))
- ret = gst_v4l2_video_dec_register (plugin, basename, it->device_path,
+ if (gst_v4l2_is_video_dec (sink_caps, src_caps)) {
+ gst_v4l2_video_dec_register (plugin, basename, it->device_path,
sink_caps, src_caps);
- else if (gst_v4l2_is_h264_enc (sink_caps, src_caps))
- ret = gst_v4l2_h264_enc_register (plugin, basename, it->device_path,
+ } else if (gst_v4l2_is_h264_enc (sink_caps, src_caps)) {
+ gst_v4l2_h264_enc_register (plugin, basename, it->device_path,
sink_caps, src_caps);
- else if (gst_v4l2_is_transform (sink_caps, src_caps))
- ret = gst_v4l2_transform_register (plugin, basename, it->device_path,
+ } else if (gst_v4l2_is_transform (sink_caps, src_caps)) {
+ gst_v4l2_transform_register (plugin, basename, it->device_path,
sink_caps, src_caps);
+ }
/* else if ( ... etc. */
gst_caps_unref (sink_caps);
gst_caps_unref (src_caps);
g_free (basename);
-
- if (!ret)
- break;
}
if (video_fd >= 0)
@@ -207,7 +204,7 @@ gst_v4l2_probe_and_register (GstPlugin * plugin)
gst_v4l2_iterator_free (it);
- return ret;
+ return TRUE;
}
#endif