Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion libass/ass.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ typedef struct ass_image {
enum {
IMAGE_TYPE_CHARACTER,
IMAGE_TYPE_OUTLINE,
IMAGE_TYPE_SHADOW
IMAGE_TYPE_SHADOW,
IMAGE_TYPE_BACKGROUND
} type;

} ASS_Image;
Expand Down
6 changes: 5 additions & 1 deletion libass/ass_render.c
Original file line number Diff line number Diff line change
Expand Up @@ -2291,6 +2291,7 @@ static void add_background(ASS_Renderer *render_priv, EventImages *event_images)
ASS_Image *img = my_draw_bitmap(nbuffer, w, h, w, left, top,
render_priv->state.c[3], NULL);
if (img) {
img->type = IMAGE_TYPE_BACKGROUND;
img->next = event_images->imgs;
event_images->imgs = img;
}
Expand Down Expand Up @@ -2789,7 +2790,10 @@ static int ass_image_compare(ASS_Image *i1, ASS_Image *i2)
return 2;
if (i1->color != i2->color)
return 2;
if (i1->bitmap != i2->bitmap)
if (i1->type != i2->type)
return 2;
if (i1->type != IMAGE_TYPE_BACKGROUND &&
i1->bitmap != i2->bitmap)
return 2;
if (i1->dst_x != i2->dst_x)
return 1;
Expand Down