X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fass_split.c;h=189272bbd98ebfb6999d83f0202b6607ada0655c;hb=d07534b5f5f20b4f780f5b0284aca6354da00695;hp=67da7c6d84c002861a52679c0cbe17ada12dc9f4;hpb=2ac399d7faa5ac80088715780769522d1141b549;p=ffmpeg diff --git a/libavcodec/ass_split.c b/libavcodec/ass_split.c index 67da7c6d84c..189272bbd98 100644 --- a/libavcodec/ass_split.c +++ b/libavcodec/ass_split.c @@ -376,6 +376,8 @@ ASSSplitContext *ff_ass_split(const char *buf) ASSSplitContext *ctx = av_mallocz(sizeof(*ctx)); if (!ctx) return NULL; + if (buf && !strncmp(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);