adaptivedemux2: Fix CLAMP usage

It's a positive value

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8229>
This commit is contained in:
Edward Hervey 2025-01-04 10:00:59 +01:00 committed by GStreamer Marge Bot
parent 02df2a5e9a
commit b0f527a79e

View file

@ -2715,7 +2715,7 @@ gst_adaptive_demux2_stream_update_current_bitrate (GstAdaptiveDemux2Stream *
/* No explicit connection_speed, so choose the new variant to use as a
* fraction of the measured download rate */
target_download_rate =
CLAMP (stream->current_download_rate, 0,
MIN (stream->current_download_rate,
G_MAXUINT) * (gdouble) demux->bandwidth_target_ratio;
GST_DEBUG_OBJECT (stream, "Bitrate after target ratio limit (%0.2f): %u",