Commit a52eef68 authored by John Stebbins's avatar John Stebbins Committed by Philip Langdale

lavc/ass_split: fix parsing utf8 scripts

The [Script Info] section was skipped if starts with UTF8 BOM
Signed-off-by: 's avatarPhilip Langdale <philipl@overt.org>
parent b8d4a66b
......@@ -376,6 +376,8 @@ ASSSplitContext *ff_ass_split(const char *buf)
ASSSplitContext *ctx = av_mallocz(sizeof(*ctx));
if (!ctx)
return NULL;
if (buf && !memcmp(buf, "\xef\xbb\xbf", 3)) // Skip UTF-8 BOM header
buf += 3;
ctx->current_section = -1;
if (ass_split(ctx, buf) < 0) {
ff_ass_split_free(ctx);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment