From 7cb4f36c428926d8c9bdf68a7bf7d2c4f0193741 Mon Sep 17 00:00:00 2001 From: =?UTF-8?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 4f4cad4c1a..789542fe7e 100644 --- a/subprojects/gst-plugins-bad/ext/srt/gstsrtobject.c +++ b/subprojects/gst-plugins-bad/ext/srt/gstsrtobject.c @@ -771,7 +771,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: