From 04a70ea8355287189be3937368fde032329b288b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Wed, 16 Jan 2013 09:50:16 +0000 Subject: [PATCH] typefindfunctions: minor SSA typefinder clean-up Remove code that doesn't make sense as it is. If there's a 2-byte UTF-16 BOM or a 4-byte UTF-32 BOM, the following text won't be 8-bit ASCII. --- gst/typefind/gsttypefindfunctions.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gst/typefind/gsttypefindfunctions.c b/gst/typefind/gsttypefindfunctions.c index 5fe01010cc..e9bffceb7e 100644 --- a/gst/typefind/gsttypefindfunctions.c +++ b/gst/typefind/gsttypefindfunctions.c @@ -4922,11 +4922,11 @@ ssa_type_find (GstTypeFind * tf, gpointer private) if (data == NULL) return; - /* there might be a BOM at the beginning */ + /* FIXME: detect utf-16/32 BOM and convert before typefinding the rest */ + + /* there might be a UTF-8 BOM at the beginning */ if (memcmp (data, "[Script Info]", 13) != 0 && - memcmp (data + 2, "[Script Info]", 13) != 0 && - memcmp (data + 3, "[Script Info]", 13) != 0 && - memcmp (data + 4, "[Script Info]", 13) != 0) { + memcmp (data + 3, "[Script Info]", 13) != 0) { return; }