From 9d3254cca0bf5f8a5a99eea52a0f396f993d6030 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Mon, 15 May 2006 14:19:35 +0000 Subject: [PATCH] gst/subparse/gstsubparse.c: Improve SAMI typefinding: handle case where there are whitespaces or newlines in front of... Original commit message from CVS: * gst/subparse/gstsubparse.c: (gst_sub_parse_data_format_autodetect): Improve SAMI typefinding: handle case where there are whitespaces or newlines in front of the first tag (#169936). --- ChangeLog | 8 ++++++++ gst/subparse/gstsubparse.c | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 5bbd5e4fd7..a438623b26 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2006-05-15 Tim-Philipp Müller + + * gst/subparse/gstsubparse.c: + (gst_sub_parse_data_format_autodetect): + Improve SAMI typefinding: handle case where there are + whitespaces or newlines in front of the first + tag (#169936). + 2006-05-15 Tim-Philipp Müller * configure.ac: diff --git a/gst/subparse/gstsubparse.c b/gst/subparse/gstsubparse.c index 8e2f6bf99a..4b7d1150d8 100644 --- a/gst/subparse/gstsubparse.c +++ b/gst/subparse/gstsubparse.c @@ -626,7 +626,7 @@ gst_sub_parse_data_format_autodetect (gchar * match_str) GST_LOG ("MPSub (time based) format detected"); return GST_SUB_PARSE_FORMAT_MPSUB; } - if (!g_ascii_strncasecmp (match_str, "", 6)) { + if (xmlStrcasestr ((const xmlChar *) match_str, (xmlChar *) "")) { GST_LOG ("SAMI (time based) format detected"); return GST_SUB_PARSE_FORMAT_SAMI; }