codectimestamper: Fix gint wraparound in pts_compare_func
authorPeter Stensson <petest@axis.com>
Wed, 23 Oct 2024 12:28:30 +0000 (14:28 +0200)
committerBackport Bot <gitlab-backport-bot@gstreamer-foundation.org>
Fri, 25 Oct 2024 09:18:56 +0000 (10:18 +0100)
commit516e422231f5d814e299be1706147cb44a353e8b
treeaca78ae9e8b094b960246ec3c6d348f18070382f
parent908b79d168b06ad577695d7245f9ae3a57723ae9
codectimestamper: Fix gint wraparound in pts_compare_func

The diff between compared timestamps might be outside the gint range
resulting in wrong sorting results. This patch corrects that by
comparing the timestamps and then returning -1, 0 or 1 depending on the
result.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7737>
subprojects/gst-plugins-bad/gst/codectimestamper/gstcodectimestamper.c
subprojects/gst-plugins-bad/tests/check/elements/h264timestamper.c