srt: Avoid crash on unknown option

Use the correct field that is null instead of the struct value which
never is.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3672>
This commit is contained in:
Olivier Crête 2023-01-03 15:01:37 -05:00 committed by GStreamer Marge Bot
parent 401ea9f683
commit f45cfe0d53

View file

@ -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: