From 0502e6bf5b10d21950d4586b06a89d7be0670fe3 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Mon, 4 Jul 2016 16:12:27 +0200 Subject: [PATCH] media-descriptor: Fine-tune stream-id checking Only expect fully identical stream-id from URI which are not local files nor from our local http server. Fixes issues with non-default http server port --- validate/gst/validate/media-descriptor.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/validate/gst/validate/media-descriptor.c b/validate/gst/validate/media-descriptor.c index 98fa82c211..cff64794e3 100644 --- a/validate/gst/validate/media-descriptor.c +++ b/validate/gst/validate/media-descriptor.c @@ -295,7 +295,6 @@ compare_tags (GstValidateMediaDescriptor * ref, static gboolean stream_id_is_equal (const gchar * uri, const gchar * rid, const gchar * cid) { - gboolean is_file = g_str_has_prefix (uri, "file://"); GChecksum *cs; const gchar *stream_id; @@ -303,8 +302,9 @@ stream_id_is_equal (const gchar * uri, const gchar * rid, const gchar * cid) if (g_strcmp0 (rid, cid) == 0) return TRUE; - /* If it's not from file, it should have been the same */ - if (!is_file) + /* If it's not from file or from our local http server, it should have been the same */ + if (!g_str_has_prefix (uri, "file://") + && !g_str_has_prefix (uri, "http://127.0.0.1")) return FALSE; /* taken from basesrc, compute the reference stream-id */