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.
This commit is contained in:
Tim-Philipp Müller 2013-01-16 09:50:16 +00:00 committed by Tim-Philipp Müller
parent 8d4cb64a4b
commit 04a70ea835

View file

@ -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;
}