diff --git a/gst/gstvalue.c b/gst/gstvalue.c index 05b76efffc..452cc17570 100644 --- a/gst/gstvalue.c +++ b/gst/gstvalue.c @@ -723,17 +723,18 @@ gst_value_deserialize_fourcc (GValue * dest, const char *s) gboolean ret = FALSE; guint32 fourcc = 0; char *end; + gint l = strlen (s); - if (strlen (s) == 4) { + if (l == 4) { fourcc = GST_MAKE_FOURCC (s[0], s[1], s[2], s[3]); ret = TRUE; - } else if (strlen (s) == 3) { + } else if (l == 3) { fourcc = GST_MAKE_FOURCC (s[0], s[1], s[2], ' '); ret = TRUE; - } else if (strlen (s) == 2) { + } else if (l == 2) { fourcc = GST_MAKE_FOURCC (s[0], s[1], ' ', ' '); ret = TRUE; - } else if (strlen (s) == 1) { + } else if (l == 1) { fourcc = GST_MAKE_FOURCC (s[0], ' ', ' ', ' '); ret = TRUE; } else if (g_ascii_isdigit (*s)) {