X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fass_split.c;h=c2c388d9f05e93164f9e8083a0dcb315654bfd8c;hb=ddee53e2680a03a8b8beaa0de02e235046c599c3;hp=67da7c6d84c002861a52679c0cbe17ada12dc9f4;hpb=e645d7a6d452df83cedcbb1d6708429ceea156da;p=ffmpeg diff --git a/libavcodec/ass_split.c b/libavcodec/ass_split.c index 67da7c6d84c..c2c388d9f05 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 && !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);