From b0f527a79e4411b6ccc008a1d9c6e6d44e1cd059 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Sat, 4 Jan 2025 10:00:59 +0100 Subject: [PATCH] adaptivedemux2: Fix CLAMP usage It's a positive value Part-of: --- .../ext/adaptivedemux2/gstadaptivedemux-stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subprojects/gst-plugins-good/ext/adaptivedemux2/gstadaptivedemux-stream.c b/subprojects/gst-plugins-good/ext/adaptivedemux2/gstadaptivedemux-stream.c index 6f23ca262e..b66bf21c92 100644 --- a/subprojects/gst-plugins-good/ext/adaptivedemux2/gstadaptivedemux-stream.c +++ b/subprojects/gst-plugins-good/ext/adaptivedemux2/gstadaptivedemux-stream.c @@ -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",