From: Sebastian Dröge Date: Mon, 23 May 2011 13:51:14 +0000 (+0200) Subject: subparse: Interprete typefind strings passed to GRegex as raw bytes instead of valid... X-Git-Tag: 1.19.3~511^2~6555^2~876 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3dc49871383cbf7f8ac2e07dcb583591668fbe57;p=platform%2Fupstream%2Fgstreamer.git subparse: Interprete typefind strings passed to GRegex as raw bytes instead of valid UTF8 --- diff --git a/gst/subparse/gstsubparse.c b/gst/subparse/gstsubparse.c index 7bf0f2d..2cc6b56 100644 --- a/gst/subparse/gstsubparse.c +++ b/gst/subparse/gstsubparse.c @@ -1238,7 +1238,8 @@ gst_sub_parse_data_format_autodetect_regex_once (GstSubParseRegex regtype) switch (regtype) { case GST_SUB_PARSE_REGEX_MDVDSUB: result = - (gpointer) g_regex_new ("^\\{[0-9]+\\}\\{[0-9]+\\}", 0, 0, &gerr); + (gpointer) g_regex_new ("^\\{[0-9]+\\}\\{[0-9]+\\}", G_REGEX_RAW, 0, + &gerr); if (result == NULL) { g_warning ("Compilation of mdvd regex failed: %s", gerr->message); g_error_free (gerr); @@ -1248,7 +1249,7 @@ gst_sub_parse_data_format_autodetect_regex_once (GstSubParseRegex regtype) result = (gpointer) g_regex_new ("^([ 0-9]){0,3}[0-9]\\s*(\x0d)?\x0a" "[ 0-9][0-9]:[ 0-9][0-9]:[ 0-9][0-9][,.][ 0-9]{0,2}[0-9]" " +--> +([ 0-9])?[0-9]:[ 0-9][0-9]:[ 0-9][0-9][,.][ 0-9]{0,2}[0-9]", - 0, 0, &gerr); + G_REGEX_RAW, 0, &gerr); if (result == NULL) { g_warning ("Compilation of subrip regex failed: %s", gerr->message); g_error_free (gerr); @@ -1256,7 +1257,7 @@ gst_sub_parse_data_format_autodetect_regex_once (GstSubParseRegex regtype) break; case GST_SUB_PARSE_REGEX_DKS: result = (gpointer) g_regex_new ("^\\[[0-9]+:[0-9]+:[0-9]+\\].*", - 0, 0, &gerr); + G_REGEX_RAW, 0, &gerr); if (result == NULL) { g_warning ("Compilation of dks regex failed: %s", gerr->message); g_error_free (gerr);