audiorate: Fix unsigned integer comparision

next_offset uses a magic "-1" value for unset values. Use that value and not
checking whether it's positive (it always is, it's unsigned)

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8286>
This commit is contained in:
Edward Hervey 2025-01-03 12:01:37 +01:00 committed by GStreamer Marge Bot
parent 344ef36b5a
commit 65b4d26db6

View file

@ -228,7 +228,7 @@ gst_audio_rate_setcaps (GstAudioRate * audiorate, GstCaps * caps)
prev_rate = audiorate->info.rate;
audiorate->info = info;
if (audiorate->next_offset >= 0 && prev_rate > 0 && prev_rate != info.rate) {
if (audiorate->next_offset != -1 && prev_rate > 0 && prev_rate != info.rate) {
GST_DEBUG_OBJECT (audiorate,
"rate changed from %d to %d", prev_rate, info.rate);