r32416 - trunk/subreader.c
Author: cehoyos Date: Thu Sep 30 11:08:37 2010 New Revision: 32416 Log: Simplify comparison. Patch by Clément Bœsch, ubitux gmail Modified: trunk/subreader.c Modified: trunk/subreader.c ============================================================================== --- trunk/subreader.c Thu Sep 30 00:06:44 2010 (r32415) +++ trunk/subreader.c Thu Sep 30 11:08:37 2010 (r32416) @@ -1101,7 +1101,6 @@ static subtitle *sub_read_line_jacosub(s 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 @@ static int sub_autodetect (stream_t* st, {*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;}
participants (1)
-
cehoyos