From f45cfe0d53fb06deb0e61f19325bbf7123dcbc02 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Olivier=20Cr=C3=AAte?= Date: Tue, 3 Jan 2023 15:01:37 -0500 Subject: [PATCH] srt: Avoid crash on unknown option Use the correct field that is null instead of the struct value which never is. Part-of: --- subprojects/gst-plugins-bad/ext/srt/gstsrtobject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subprojects/gst-plugins-bad/ext/srt/gstsrtobject.c b/subprojects/gst-plugins-bad/ext/srt/gstsrtobject.c index e49e655..d16e2b9 100644 --- a/subprojects/gst-plugins-bad/ext/srt/gstsrtobject.c +++ b/subprojects/gst-plugins-bad/ext/srt/gstsrtobject.c @@ -795,7 +795,7 @@ gst_srt_object_set_socket_option (GstStructure * s, const gchar * key, { SrtOption *option = srt_options; - for (; option; ++option) { + for (; option->name; ++option) { if (g_str_equal (key, option->name)) { switch (option->gtype) { case G_TYPE_INT: -- 2.7.4