diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2020-12-02 09:39:45 +0200 |
---|---|---|
committer | GStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org> | 2020-12-02 16:46:37 +0000 |
commit | 2176fa360c5ad7b32ab79d9dd8040654e59597fe (patch) | |
tree | 2f5cabca2751233944d587f4dd7b142ed154a57c | |
parent | 2ae8a49b2fd9aab951bb8ce320c0beb4fb6e901c (diff) | |
download | gstreamer-plugins-bad-2176fa360c5ad7b32ab79d9dd8040654e59597fe.tar.gz |
adaptivedemux: Don't log with non-GObject objects
Instead of using the streams, log with the pad of the streams.
https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1457
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1847>
-rw-r--r-- | gst-libs/gst/adaptivedemux/gstadaptivedemux.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/gst-libs/gst/adaptivedemux/gstadaptivedemux.c b/gst-libs/gst/adaptivedemux/gstadaptivedemux.c index e74a00981..74f9950e5 100644 --- a/gst-libs/gst/adaptivedemux/gstadaptivedemux.c +++ b/gst-libs/gst/adaptivedemux/gstadaptivedemux.c @@ -1274,7 +1274,8 @@ gst_adaptive_demux_expose_streams (GstAdaptiveDemux * demux) * Even if it doesn't do that, we will change its state later in * gst_adaptive_demux_stop_tasks. */ - GST_LOG_OBJECT (stream, "Marking stream as cancelled"); + GST_LOG_OBJECT (GST_ADAPTIVE_DEMUX_STREAM_PAD (stream), + "Marking stream as cancelled"); gst_task_stop (stream->download_task); g_mutex_lock (&stream->fragment_download_lock); stream->cancelled = TRUE; @@ -2290,9 +2291,9 @@ gst_adaptive_demux_stream_update_current_bitrate (GstAdaptiveDemux * demux, average_bitrate = _update_average_bitrate (demux, stream, fragment_bitrate); - GST_INFO_OBJECT (stream, "last fragment bitrate was %" G_GUINT64_FORMAT, - fragment_bitrate); - GST_INFO_OBJECT (stream, + GST_INFO_OBJECT (GST_ADAPTIVE_DEMUX_STREAM_PAD (stream), + "last fragment bitrate was %" G_GUINT64_FORMAT, fragment_bitrate); + GST_INFO_OBJECT (GST_ADAPTIVE_DEMUX_STREAM_PAD (stream), "Last %u fragments average bitrate is %" G_GUINT64_FORMAT, NUM_LOOKBACK_FRAGMENTS, average_bitrate); @@ -2531,7 +2532,8 @@ gst_adaptive_demux_stream_push_buffer (GstAdaptiveDemuxStream * stream, g_mutex_lock (&stream->fragment_download_lock); if (G_UNLIKELY (stream->cancelled)) { - GST_LOG_OBJECT (stream, "Stream was cancelled"); + GST_LOG_OBJECT (GST_ADAPTIVE_DEMUX_STREAM_PAD (stream), + "Stream was cancelled"); ret = stream->last_ret = GST_FLOW_FLUSHING; g_mutex_unlock (&stream->fragment_download_lock); return ret; |