[FFmpeg-devel] [PATCH 2/2] ass_split: accept files with only \n and no \r.
Nicolas George
nicolas.george at normalesup.org
Wed Feb 29 13:56:18 CET 2012
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.
Signed-off-by: Nicolas George <nicolas.george at normalesup.org>
---
libavcodec/ass_split.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libavcodec/ass_split.c b/libavcodec/ass_split.c
index 2a3b764..a0b7254 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) {
--
1.7.9
More information about the ffmpeg-devel
mailing list