r1006: configure: Use libx264_pic instead of libx264 if available.
[cinelerra_cv/mob.git] / cinelerra / jerrormgr.c
blob3f037c46ea32563f4bc61a029fd042a223e8d4c7
1 #include <stdio.h>
2 #include <stdlib.h>
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;
15 METHODDEF(void)
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);