diff options
author | Thomas G. Lane <tgl@netcom.com> | 1995-03-15 00:00:00 +0000 |
---|---|---|
committer | DRC <information@libjpeg-turbo.org> | 2015-07-29 15:30:19 -0500 |
commit | a8b67c4fbbfde9b4b4e03f2dea8f4f0b1900fc33 (patch) | |
tree | 38c3f44f85dffa2162d0d80959797cf2b712bf1e /example.c | |
parent | 9ba2f5ed3649fb6de83d3c16e4dba1443aaca983 (diff) |
The Independent JPEG Group's JPEG software v5b
Diffstat (limited to 'example.c')
-rw-r--r-- | example.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -83,6 +83,8 @@ write_JPEG_file (char * filename, int quality) * (see the second half of this file for an example). But here we just * take the easy way out and use the standard error handler, which will * print a message on stderr and call exit() if compression fails. + * Note that this struct must live as long as the main JPEG parameter + * struct, to avoid dangling-pointer problems. */ struct jpeg_error_mgr jerr; /* More stuff */ @@ -281,7 +283,10 @@ read_JPEG_file (char * filename) * working space (which is allocated as needed by the JPEG library). */ struct jpeg_decompress_struct cinfo; - /* We use our private extension JPEG error handler. */ + /* We use our private extension JPEG error handler. + * Note that this struct must live as long as the main JPEG parameter + * struct, to avoid dangling-pointer problems. + */ struct my_error_mgr jerr; /* More stuff */ FILE * infile; /* source file */ |