diff --git a/libavcodec/ass_split.c b/libavcodec/ass_split.c index 7ee48b4a5c..4ef3092cf8 100644 --- a/libavcodec/ass_split.c +++ b/libavcodec/ass_split.c @@ -267,7 +267,8 @@ static const char *ass_split_section(ASSSplitContext *ctx, const char *buf) } } } - buf += strcspn(buf, "\n") + 1; + buf += strcspn(buf, "\n"); + buf += !!*buf; } return buf; }