mirror of
https://github.com/mpv-player/mpv
synced 2025-01-10 17:09:45 +00:00
sd_ass: fix memory leaks with --sub-ass=no
This affects only the codepath which forcibly disables any ASS tags.
This commit is contained in:
parent
2f4bd58f4a
commit
1f38c2107d
@ -564,7 +564,7 @@ static void fill_plaintext(struct sd *sd, double pts)
|
||||
text++;
|
||||
}
|
||||
|
||||
if (!dst.start || !dst.start[0])
|
||||
if (!dst.start)
|
||||
return;
|
||||
|
||||
int n = ass_alloc_event(track);
|
||||
@ -576,6 +576,8 @@ static void fill_plaintext(struct sd *sd, double pts)
|
||||
|
||||
if (track->default_style < track->n_styles)
|
||||
track->styles[track->default_style].Alignment = ctx->on_top ? 6 : 2;
|
||||
|
||||
talloc_free(dst.start);
|
||||
}
|
||||
|
||||
static void reset(struct sd *sd)
|
||||
@ -596,6 +598,7 @@ static void uninit(struct sd *sd)
|
||||
if (ctx->converter)
|
||||
lavc_conv_uninit(ctx->converter);
|
||||
ass_free_track(ctx->ass_track);
|
||||
ass_free_track(ctx->shadow_track);
|
||||
enable_output(sd, false);
|
||||
ass_library_done(ctx->ass_library);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user