v4l2videodec: add property set/get PROP_CAPTURE_IO_MODE error handling
authorPeter Seiderer <ps.report@gmx.net>
Fri, 12 Jan 2018 08:53:37 +0000 (09:53 +0100)
committerNicolas Dufresne <nicolas.dufresne@collabora.com>
Fri, 12 Jan 2018 14:21:18 +0000 (09:21 -0500)
https://bugzilla.gnome.org/show_bug.cgi?id=791841

sys/v4l2/gstv4l2videodec.c

index d1d1b95..dc06774 100644 (file)
@@ -67,8 +67,10 @@ gst_v4l2_video_dec_set_property (GObject * object,
 
   switch (prop_id) {
     case PROP_CAPTURE_IO_MODE:
-      gst_v4l2_object_set_property_helper (self->v4l2capture, prop_id, value,
-          pspec);
+      if (!gst_v4l2_object_set_property_helper (self->v4l2capture,
+              prop_id, value, pspec)) {
+        G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      }
       break;
 
       /* By default, only set on output */
@@ -89,8 +91,10 @@ gst_v4l2_video_dec_get_property (GObject * object,
 
   switch (prop_id) {
     case PROP_CAPTURE_IO_MODE:
-      gst_v4l2_object_get_property_helper (self->v4l2capture, prop_id, value,
-          pspec);
+      if (!gst_v4l2_object_get_property_helper (self->v4l2capture,
+              prop_id, value, pspec)) {
+        G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+      }
       break;
 
       /* By default read from output */