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: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2452>
This commit is contained in:
Philippe Normand 2022-05-18 16:54:53 +01:00 committed by Tim-Philipp Müller
parent 6f727c219f
commit e487263abd

View file

@ -918,7 +918,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);