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/3682>
This commit is contained in:
Olivier Crête 2023-01-03 15:01:37 -05:00 committed by Tim-Philipp Müller
parent 32d11fdaf4
commit 7cb4f36c42

View file

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