summaryrefslogtreecommitdiff
path: root/gst/typefind
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.com>2015-06-11 23:32:55 +0100
committerTim-Philipp Müller <tim@centricular.com>2015-06-11 23:33:30 +0100
commitf5ad17871ce95567719fa8bad5b98875652cebaf (patch)
tree1adca3d7eab1603d8e586f3d03a56c01df1037d7 /gst/typefind
parentd182e66bcef175a14a0c2afb2c46558be7bd038f (diff)
typefinding: check for full UTF-8 BOM in MSS typefinder
https://bugzilla.gnome.org/show_bug.cgi?id=750802
Diffstat (limited to 'gst/typefind')
-rw-r--r--gst/typefind/gsttypefindfunctions.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gst/typefind/gsttypefindfunctions.c b/gst/typefind/gsttypefindfunctions.c
index def9217a6..024650ccc 100644
--- a/gst/typefind/gsttypefindfunctions.c
+++ b/gst/typefind/gsttypefindfunctions.c
@@ -3590,13 +3590,13 @@ mss_manifest_type_find (GstTypeFind * tf, gpointer unused)
length = gst_type_find_get_length (tf);
/* try detecting the charset */
- data = gst_type_find_peek (tf, 0, 2);
+ data = gst_type_find_peek (tf, 0, 3);
if (data == NULL)
return;
/* look for a possible BOM */
- if (data[0] == 0xEF && data[1] == 0xBB)
+ if (data[0] == 0xEF && data[1] == 0xBB && data[2] == 0xBF)
utf8_bom_detected = TRUE;
else if (data[0] == 0xFF && data[1] == 0xFE)
data_endianness = G_LITTLE_ENDIAN;