From 556ee45bfa0d60351b13df11edaba0d91960d121 Mon Sep 17 00:00:00 2001 From: Philippe Normand Date: Wed, 18 May 2022 16:54:53 +0100 Subject: [PATCH] datachannel: Notify low buffered amount according to spec Quoting https://www.w3.org/TR/webrtc/#dom-rtcdatachannel-bufferedamountlowthreshold The bufferedAmountLowThreshold attribute sets the threshold at which the bufferedAmount is considered to be low. When the bufferedAmount decreases from above this threshold to **equal** or below it, the bufferedamountlow event fires. Part-of: --- subprojects/gst-plugins-bad/ext/webrtc/webrtcdatachannel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subprojects/gst-plugins-bad/ext/webrtc/webrtcdatachannel.c b/subprojects/gst-plugins-bad/ext/webrtc/webrtcdatachannel.c index 8b2110a..89fbd7c 100644 --- a/subprojects/gst-plugins-bad/ext/webrtc/webrtcdatachannel.c +++ b/subprojects/gst-plugins-bad/ext/webrtc/webrtcdatachannel.c @@ -945,7 +945,7 @@ on_appsrc_data (GstPad * pad, GstPadProbeInfo * info, gpointer user_data) channel->parent.buffered_amount_low_threshold, channel->parent.buffered_amount); if (prev_amount >= channel->parent.buffered_amount_low_threshold - && channel->parent.buffered_amount < + && channel->parent.buffered_amount <= channel->parent.buffered_amount_low_threshold) { _channel_enqueue_task (channel, (ChannelTask) _emit_low_threshold, NULL, NULL); -- 2.7.4