1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-24 13:56:33 +02:00

ass_split: reindent

This commit is contained in:
Rodger Combs 2016-09-10 00:29:50 -05:00
parent 3b32e1313c
commit dca03ec5f4
No known key found for this signature in database
GPG Key ID: E3E54DCDCD3CB843

View File

@ -276,23 +276,23 @@ static const char *ass_split_section(ASSSplitContext *ctx, const char *buf)
if (section->format_header && !order) {
len = strlen(section->format_header);
if (buf[len] == ':' && !strncmp(buf, section->format_header, len)) {
buf += len + 1;
while (!is_eol(*buf)) {
buf = skip_space(buf);
len = strcspn(buf, ", \r\n");
if (!(tmp = av_realloc_array(order, (*number + 1), sizeof(*order))))
return NULL;
order = tmp;
order[*number] = -1;
for (i=0; section->fields[i].name; i++)
if (!strncmp(buf, section->fields[i].name, len)) {
order[*number] = i;
break;
}
(*number)++;
buf = skip_space(buf + len + (buf[len] == ','));
}
ctx->field_order[ctx->current_section] = order;
buf += len + 1;
while (!is_eol(*buf)) {
buf = skip_space(buf);
len = strcspn(buf, ", \r\n");
if (!(tmp = av_realloc_array(order, (*number + 1), sizeof(*order))))
return NULL;
order = tmp;
order[*number] = -1;
for (i=0; section->fields[i].name; i++)
if (!strncmp(buf, section->fields[i].name, len)) {
order[*number] = i;
break;
}
(*number)++;
buf = skip_space(buf + len + (buf[len] == ','));
}
ctx->field_order[ctx->current_section] = order;
goto next_line;
}
}