changeset 32330:acbe908638b2

Simplify comparison. Patch by Clment Bsch, ubitux gmail
author cehoyos
date Thu, 30 Sep 2010 09:08:37 +0000
parents 597a570963fa
children 3661c193c3ba
files subreader.c
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/subreader.c	Wed Sep 29 22:06:44 2010 +0000
+++ b/subreader.c	Thu Sep 30 09:08:37 2010 +0000
@@ -1101,7 +1101,6 @@
 static int sub_autodetect (stream_t* st, int *uses_time, int utf16) {
     char line[LINE_LEN+1];
     int i,j=0;
-    char p;
 
     while (j < 100) {
 	j++;
@@ -1145,7 +1144,7 @@
 		{*uses_time=1;return SUB_PJS;}
 	if (sscanf (line, "FORMAT=%d", &i) == 1)
 		{*uses_time=0; return SUB_MPSUB;}
-	if (sscanf (line, "FORMAT=TIM%c", &p)==1 && p=='E')
+	if (!memcmp(line, "FORMAT=TIME", 11))
 		{*uses_time=1; return SUB_MPSUB;}
 	if (strstr (line, "-->>"))
 		{*uses_time=0; return SUB_AQTITLE;}