v4l2bufferpool: Silence traces around unsupported source change
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Thu, 11 Feb 2021 19:48:07 +0000 (14:48 -0500)
committerNicolas Dufresne <nicolas.dufresne@collabora.com>
Fri, 19 Feb 2021 21:02:02 +0000 (16:02 -0500)
Don't be too spamy about unsupported source change flags as these will be
commonly extended in the future.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/870>

sys/v4l2/gstv4l2bufferpool.c

index 164346e..7b5050a 100644 (file)
@@ -1122,12 +1122,17 @@ again:
     if (!gst_v4l2_dequeue_event (pool->obj, &event))
       goto dqevent_failed;
 
-    if (event.type != V4L2_EVENT_SOURCE_CHANGE ||
-        (event.u.src_change.changes & V4L2_EVENT_SRC_CH_RESOLUTION) == 0) {
+    if (event.type != V4L2_EVENT_SOURCE_CHANGE) {
       GST_INFO_OBJECT (pool, "Received unhandled event, ignoring.");
       goto again;
     }
 
+    if ((event.u.src_change.changes & V4L2_EVENT_SRC_CH_RESOLUTION) == 0) {
+      GST_DEBUG_OBJECT (pool,
+          "Received non-resolution source-change, ignoring.");
+      goto again;
+    }
+
     return GST_V4L2_FLOW_RESOLUTION_CHANGE;
   }