diff options
Diffstat (limited to 'sub/ass_mp.c')
-rw-r--r-- | sub/ass_mp.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sub/ass_mp.c b/sub/ass_mp.c index 172701495f..45328fb920 100644 --- a/sub/ass_mp.c +++ b/sub/ass_mp.c @@ -240,6 +240,11 @@ static bool pack(struct mp_ass_packer *p, struct sub_bitmaps *res, int imgfmt) talloc_steal(p, p->cached_img); } + if (!mp_image_make_writeable(p->cached_img)) { + packer_reset(p->packer); + return false; + } + res->packed = p->cached_img; for (int n = 0; n < res->num_parts; n++) { |