Skip to content

Commit

Permalink
lib: Replace usage of "g_str_equal" with "g_strcmp0"
Browse files Browse the repository at this point in the history
The first one is meant for hash tables comparisons and does not guard against NULL values (#259).
  • Loading branch information
Rafostar committed May 15, 2022
1 parent be58af2 commit c6c4334
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/gst/clapper/gstclapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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;
}
}
Expand Down

1 comment on commit c6c4334

@Rafostar
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mistakenly linked wrong issue here. Meant #258

Please sign in to comment.