appsrc: log when segment changes
authorGuillaume Desmottes <guillaume.desmottes@onestream.live>
Tue, 9 Nov 2021 11:01:13 +0000 (12:01 +0100)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Tue, 9 Nov 2021 16:19:05 +0000 (16:19 +0000)
We were logging when it does not change but not when it does, which is
confusing when reading logs.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1327>

subprojects/gst-plugins-base/gst-libs/gst/app/gstappsrc.c

index ce0875d..16d2a32 100644 (file)
@@ -2761,6 +2761,10 @@ gst_app_src_push_sample_internal (GstAppSrc * appsrc, GstSample * sample)
       GST_LOG_OBJECT (appsrc, "segment wasn't changed");
       g_mutex_unlock (&priv->mutex);
       goto handle_buffer;
+    } else {
+      GST_LOG_OBJECT (appsrc,
+          "segment changed %" GST_SEGMENT_FORMAT " -> %" GST_SEGMENT_FORMAT,
+          &priv->last_segment, segment);
     }
 
     /* will be pushed to queue with next buffer/buffer-list */