rtp: Fix incorrect RTP channel order lookup by name
authorArun Raghavan <arun@asymptotic.io>
Fri, 15 Dec 2023 20:19:35 +0000 (15:19 -0500)
committerTim-Philipp Müller <tim@centricular.com>
Sat, 16 Dec 2023 11:04:57 +0000 (11:04 +0000)
The g_ascii_strcasecmp() logic is inverted, since it returns 0 on equality.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5817>

subprojects/gst-plugins-good/gst/rtp/gstrtpchannels.c

index 9921293..d0694cb 100644 (file)
@@ -250,7 +250,7 @@ gst_rtp_channels_get_by_order (gint channels, const gchar * order)
     }
 
     /* compare names */
-    if (g_ascii_strcasecmp (channel_orders[i].name, order)) {
+    if (!g_ascii_strcasecmp (channel_orders[i].name, order)) {
       res = &channel_orders[i];
       break;
     }