all repos — mgba @ 16c0132e8fd44f8e5d189540927a6a98cdde7aa7

mGBA Game Boy Advance Emulator

Feature: Increase GIF frame resolution if needed
Vicki Pfau vi@endrift.com
Mon, 23 Apr 2018 22:38:21 -0700
commit

16c0132e8fd44f8e5d189540927a6a98cdde7aa7

parent

e629d65682299004052522329c510dfcb5113e11

1 files changed, 4 insertions(+), 0 deletions(-)

jump to
M src/feature/imagemagick/imagemagick-gif-encoder.csrc/feature/imagemagick/imagemagick-gif-encoder.c

@@ -98,6 +98,10 @@ }

static void _magickVideoDimensionsChanged(struct mAVStream* stream, unsigned width, unsigned height) { struct ImageMagickGIFEncoder* encoder = (struct ImageMagickGIFEncoder*) stream; + if (width * height > encoder->iwidth * encoder->iheight) { + free(encoder->frame); + encoder->frame = malloc(width * height * 4); + } encoder->iwidth = width; encoder->iheight = height; }