From 2670f2381278ee9c26cd9be926566525e590120f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim-Philipp=20M=C3=BCller?= Date: Fri, 24 Jul 2009 09:35:38 +0100 Subject: [PATCH] typefind: recognise Kate spu subtitles as well Recognise spu-subtitles, SUB and K-SPU as valid categories for Kate subtitles as well. --- gst/typefind/gsttypefindfunctions.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gst/typefind/gsttypefindfunctions.c b/gst/typefind/gsttypefindfunctions.c index 8a45ae4..5600c53 100644 --- a/gst/typefind/gsttypefindfunctions.c +++ b/gst/typefind/gsttypefindfunctions.c @@ -2689,7 +2689,10 @@ kate_type_find (GstTypeFind * tf, gpointer private) /* make sure we always have a NUL-terminated string */ memcpy (category, data + 48, 15); GST_LOG ("kate category: %s", category); - if (strstr (category, "subtitle") != NULL) { + /* canonical categories for subtitles: subtitles, spu-subtitles, SUB, K-SPU */ + if (strcmp (category, "subtitles") == 0 || strcmp (category, "SUB") == 0 || + strcmp (category, "spu-subtitles") == 0 || + strcmp (category, "K-SPU") == 0) { gst_type_find_suggest_simple (tf, GST_TYPE_FIND_MAXIMUM, "subtitle/x-kate", NULL); } else { -- 2.7.4