From 59eacaa966a6e534d9c95805d76c33cb5b3a7204 Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Fri, 20 Apr 2018 11:04:44 -0300 Subject: [PATCH] encoding-profile: Handle escaped '\:' in caps describing profiles Otherwise it won't be possible to specify some profiles such as video/x-h264,profile=(string)high-4:4:4 With this patch, we can do video/x-h264,profile=(string)high-4\:4\:4 --- gst-libs/gst/pbutils/encoding-profile.c | 46 ++++++++++++++++++------- 1 file changed, 34 insertions(+), 12 deletions(-) diff --git a/gst-libs/gst/pbutils/encoding-profile.c b/gst-libs/gst/pbutils/encoding-profile.c index 9295ccccaf..d75007d0d4 100644 --- a/gst-libs/gst/pbutils/encoding-profile.c +++ b/gst-libs/gst/pbutils/encoding-profile.c @@ -1691,21 +1691,31 @@ static GstEncodingProfile * parse_encoding_profile (const gchar * value) { gchar *factory_name; - GstEncodingProfile *res; - gchar **strcaps_v = g_strsplit (value, ":", 0); + GstEncodingProfile *res = NULL; + gchar *caps_str = NULL; + gchar **strcaps_v = + g_regex_split_simple ("(?