diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2021-07-12 09:37:24 +0300 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2021-07-12 09:42:39 +0300 |
commit | 9243418a23cf369e991c44dc557a0a783b9603d7 (patch) | |
tree | 9b9a4116ddceb7620a382e63c1d10484db976aa8 /gst-libs/gst | |
parent | 71e46bcf385656bc50ebb358656947aaa1ed1d7b (diff) |
audioaggregator: Only post QoS messages if the property is enabled
Previously one of the branches did not check for the property value. To
avoid this in the future, check inside the QoS calculation function
instead.
As a side effect this now always prints the debug messages into the logs
when samples are dropped, which is useful information even without the
QoS messages.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1224>
Diffstat (limited to 'gst-libs/gst')
-rw-r--r-- | gst-libs/gst/audio/gstaudioaggregator.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gst-libs/gst/audio/gstaudioaggregator.c b/gst-libs/gst/audio/gstaudioaggregator.c index caebf182a..f40975b06 100644 --- a/gst-libs/gst/audio/gstaudioaggregator.c +++ b/gst-libs/gst/audio/gstaudioaggregator.c @@ -1671,6 +1671,9 @@ gst_audio_aggregator_pad_enqueue_qos_message (GstAudioAggregatorPad * pad, guint64 processed, dropped; GstMessage *msg; + if (!pad->priv->qos_messages) + return running_time; + if (GST_AUDIO_AGGREGATOR_PAD_GET_CLASS (pad)->convert_buffer) rate_input = GST_AUDIO_INFO_RATE (&srcpad->info); else @@ -1911,7 +1914,7 @@ gst_audio_aggregator_fill_buffer (GstAudioAggregator * aagg, } pad->priv->dropped += MIN (diff, pad->priv->size); - if (diff != 0 && pad->priv->qos_messages) { + if (diff != 0) { GstClockTime rt; rt = gst_audio_aggregator_pad_enqueue_qos_message (pad, aagg, diff); @@ -2332,7 +2335,7 @@ gst_audio_aggregator_aggregate (GstAggregator * agg, gboolean timeout) if (pad->priv->position + diff > pad->priv->size) diff = pad->priv->size - pad->priv->position; pad->priv->dropped += diff; - if (diff != 0 && pad->priv->qos_messages) { + if (diff != 0) { GstClockTime rt; rt = gst_audio_aggregator_pad_enqueue_qos_message (pad, aagg, diff); |