summaryrefslogtreecommitdiff
path: root/libavcodec/ass_split.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/ass_split.c')
-rw-r--r--libavcodec/ass_split.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/ass_split.c b/libavcodec/ass_split.c
index ddf4675acd..62c8db91a5 100644
--- a/libavcodec/ass_split.c
+++ b/libavcodec/ass_split.c
@@ -250,7 +250,9 @@ static const char *ass_split_section(ASSSplitContext *ctx, const char *buf)
ptr = struct_ptr + section->fields[order[i]].offset;
convert_func[type](ptr, buf, len);
}
- buf = skip_space(buf + len + !last);
+ buf += len;
+ if (!last && *buf) buf++;
+ buf = skip_space(buf);
}
}
} else {