From c088b7f389ebeaf1070d63ac9d38ef20bae0c7cb Mon Sep 17 00:00:00 2001 From: Nicolas George Date: Wed, 29 Feb 2012 13:46:32 +0100 Subject: ass_split: accept files with only \n and no \r. The +1 is there to skip the ','. With \r\n, the +1 skips the \r but that is ok. With only \n, the +1 skips it and all hell breaks loose. --- libavcodec/ass_split.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavcodec/ass_split.c') diff --git a/libavcodec/ass_split.c b/libavcodec/ass_split.c index 2a3b76445e..a0b72542c7 100644 --- a/libavcodec/ass_split.c +++ b/libavcodec/ass_split.c @@ -232,7 +232,7 @@ static const char *ass_split_section(ASSSplitContext *ctx, const char *buf) break; } (*number)++; - buf = skip_space(buf + len + 1); + buf = skip_space(buf + len + (buf[len] == ',')); } ctx->field_order[ctx->current_section] = order; } else if (section->fields_header) { -- cgit v1.2.3