# HG changeset patch # User cehoyos # Date 1285837717 0 # Node ID acbe908638b27a12f76a8506e2a0011ad1012d27 # Parent 597a570963fa4596c052a271ba642a9a6cf13e01 Simplify comparison. Patch by Clment Bsch, ubitux gmail diff -r 597a570963fa -r acbe908638b2 subreader.c --- 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;}