Permalink
Browse files

thumbnails: Buffer should be no less than FF_MIN_BUFFER_SIZE bytes

  • Loading branch information...
andoma committed May 5, 2012
1 parent c071d53 commit 9088e4715e32fad9e3b5de80af47d0f5301b5135
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/fileaccess/fa_imageloader.c
@@ -487,7 +487,7 @@ fa_image_from_video2(const char *url, const image_meta_t *im,
oframe->data[0] = pm->pm_pixels;
oframe->linesize[0] = pm->pm_linesize;
- size_t outputsize = pm->pm_linesize * h;
+ size_t outputsize = MAX(pm->pm_linesize * h, FF_MIN_BUFFER_SIZE);
void *output = malloc(outputsize);
pngencoder->width = w;
pngencoder->height = h;

0 comments on commit 9088e47

Please sign in to comment.