diff options
author | John Hawthorn <john.hawthorn@gmail.com> | 2010-01-19 19:28:23 -0800 |
---|---|---|
committer | John Hawthorn <john.hawthorn@gmail.com> | 2010-01-19 19:28:23 -0800 |
commit | f7bd697cdf90dd8725b1a7e815750c7192d9e44a (patch) | |
tree | 49b746848089f5cc008be47d548688cf1b7a6c4f /src/jpeg.c | |
parent | ba9dd18ef222e79ac30be5d2251f3e4bc40699fd (diff) | |
download | mirror-meh-f7bd697cdf90dd8725b1a7e815750c7192d9e44a.tar.gz mirror-meh-f7bd697cdf90dd8725b1a7e815750c7192d9e44a.tar.bz2 mirror-meh-f7bd697cdf90dd8725b1a7e815750c7192d9e44a.zip |
2 bugs
Diffstat (limited to 'src/jpeg.c')
-rw-r--r-- | src/jpeg.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -60,6 +60,10 @@ static struct image *jpeg_open(FILE *f){ void jpeg_prep(struct image *img){ struct jpeg_t *j = (struct jpeg_t *)img; + /* We've previously loaded this image, clean that up*/ + if(img->state & LOADED) + jpeg_destroy_decompress(&j->cinfo); + jpeg_create_decompress(&j->cinfo); rewind(j->f); jpeg_stdio_src(&j->cinfo, j->f); |