validate: launcher: Fix the condition to check if we need an http server

We could be checking if a string was in None

And use gs_string_assign when assigning the first string
without using printf like format.
This commit is contained in:
Thibault Saunier 2016-09-02 17:41:32 -03:00
parent 61669bd042
commit f7f600e730
2 changed files with 4 additions and 4 deletions

View file

@ -705,7 +705,7 @@ gst_validate_printf_valist (gpointer source, const gchar * format, va_list args)
if (_action_check_and_set_printed (action))
goto out;
g_string_printf (string, "Executing ");
g_string_assign (string, "Executing ");
} else if (*(GType *) source == GST_TYPE_VALIDATE_ACTION_TYPE) {
gint i;
@ -726,7 +726,7 @@ gst_validate_printf_valist (gpointer source, const gchar * format, va_list args)
GstValidateActionType *type = GST_VALIDATE_ACTION_TYPE (source);
g_string_printf (string, "\nAction type:");
g_string_assign (string, "\nAction type:");
g_string_append_printf (string, "\n Name: %s", type->name);
g_string_append_printf (string, "\n Implementer namespace: %s",
type->implementer_namespace);

View file

@ -720,8 +720,8 @@ not been tested and explicitely activated if you set use --wanted-tests ALL""")
uri = test.media_descriptor.get_uri()
if protocol in [Protocols.HTTP, Protocols.HLS, Protocols.DASH] and \
"127.0.0.1:%s" % (self.options.http_server_port) in uri or \
"127.0.0.1:8079" in uri:
("127.0.0.1:%s" % (self.options.http_server_port) in uri or
"127.0.0.1:8079" in uri):
return True
return False