From c6c43346fa48d47a7f769a544d7b45bd7e01bb61 Mon Sep 17 00:00:00 2001 From: Rafostar <40623528+Rafostar@users.noreply.github.com> Date: Sun, 15 May 2022 14:45:42 +0200 Subject: [PATCH] lib: Replace usage of "g_str_equal" with "g_strcmp0" The first one is meant for hash tables comparisons and does not guard against NULL values (#259). --- lib/gst/clapper/gstclapper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/gst/clapper/gstclapper.c b/lib/gst/clapper/gstclapper.c index ca40a0d6..f39322a4 100644 --- a/lib/gst/clapper/gstclapper.c +++ b/lib/gst/clapper/gstclapper.c @@ -2189,7 +2189,7 @@ gst_clapper_subtitle_info_update (GstClapper * self, g_object_get (G_OBJECT (self->playbin), "current-suburi", &suburi, NULL); if (suburi) { if (self->use_playbin3) { - if (g_str_equal (self->subtitle_sid, stream_info->stream_id)) + if (!g_strcmp0 (self->subtitle_sid, stream_info->stream_id)) info->language = g_path_get_basename (suburi); } else { g_object_get (G_OBJECT (self->playbin), "current-text", &text_index, @@ -2387,7 +2387,7 @@ gst_clapper_stream_info_find_from_stream_id (GstClapperMediaInfo * media_info, list = gst_clapper_media_info_get_stream_list (media_info); for (l = list; l != NULL; l = l->next) { info = (GstClapperStreamInfo *) l->data; - if (g_str_equal (info->stream_id, stream_id)) { + if (!g_strcmp0 (info->stream_id, stream_id)) { return info; } }