3 #include "jpegwrapper.h"
4 #include <png.h> // Need setjmp.h included by png.h
6 // Handle JPEG error conditions
7 struct bcast_error_mgr
{
8 struct jpeg_error_mgr pub
; /* "public" fields */
10 jmp_buf setjmp_buffer
; /* for return to caller */
13 typedef struct bcast_error_mgr
* bcast_error_ptr
;
16 bcast_error_exit (j_common_ptr cinfo
)
18 /* cinfo->err really points to a my_error_mgr struct, so coerce pointer */
19 bcast_error_ptr myerr
= (bcast_error_ptr
) cinfo
->err
;
21 /* Always display the message. */
22 /* We could postpone this until after returning, if we chose. */
23 (*cinfo
->err
->output_message
) (cinfo
);
25 /* Return control to the setjmp point */
26 longjmp(myerr
->setjmp_buffer
, 1);