1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-15 14:13:16 +02:00

avcodec/ass_split: check ASSSplitContext alloc

This commit is contained in:
Clément Bœsch
2015-06-13 20:39:57 +02:00
parent c3517c377e
commit 324cf0645d

View File

@@ -356,6 +356,8 @@ static int ass_split(ASSSplitContext *ctx, const char *buf)
ASSSplitContext *ff_ass_split(const char *buf) ASSSplitContext *ff_ass_split(const char *buf)
{ {
ASSSplitContext *ctx = av_mallocz(sizeof(*ctx)); ASSSplitContext *ctx = av_mallocz(sizeof(*ctx));
if (!ctx)
return NULL;
ctx->current_section = -1; ctx->current_section = -1;
if (ass_split(ctx, buf) < 0) { if (ass_split(ctx, buf) < 0) {
ff_ass_split_free(ctx); ff_ass_split_free(ctx);