From 02df2a5e9a24ebbc1ed87c6b6abb732fb0f44117 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Sat, 4 Jan 2025 10:00:07 +0100 Subject: [PATCH] adaptivedemux2: Remove useless ABS Just compare the difference (in the right order) Part-of: --- .../gst-plugins-good/ext/adaptivedemux2/hls/gsthlsdemux-util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subprojects/gst-plugins-good/ext/adaptivedemux2/hls/gsthlsdemux-util.c b/subprojects/gst-plugins-good/ext/adaptivedemux2/hls/gsthlsdemux-util.c index 20b4a06672..ce232719f0 100644 --- a/subprojects/gst-plugins-good/ext/adaptivedemux2/hls/gsthlsdemux-util.c +++ b/subprojects/gst-plugins-good/ext/adaptivedemux2/hls/gsthlsdemux-util.c @@ -319,7 +319,7 @@ get_first_mpegts_time (const guint8 * data, gsize size, guint packet_size) if (GST_CLOCK_TIME_IS_VALID (pts)) { /* Only take the PTS if it's lower than the dts and does not differ * by more than a second (which would indicate bogus values) */ - if (pts < dts && ABS (pts - dts) < GST_SECOND) + if (pts < dts && (dts - pts) < GST_SECOND) internal_time = pts; else internal_time = dts;