rework proxy scaler, fix crop-gui coord, video_data tweak for proxy_format
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / jerrormgr.c
1 #include <stdio.h>
2 #include <stdlib.h>
3 #include "jpegwrapper.h"
4 #include <png.h>       // Need setjmp.h included by png.h
5
6 // Handle JPEG error conditions
7 struct bcast_error_mgr {
8   struct jpeg_error_mgr pub;    /* "public" fields */
9
10   jmp_buf setjmp_buffer;        /* for return to caller */
11 };
12
13 typedef struct bcast_error_mgr* bcast_error_ptr;
14
15 METHODDEF(void)
16 bcast_error_exit (j_common_ptr cinfo)
17 {
18   /* cinfo->err really points to a my_error_mgr struct, so coerce pointer */
19   bcast_error_ptr myerr = (bcast_error_ptr) cinfo->err;
20
21   /* Always display the message. */
22   /* We could postpone this until after returning, if we chose. */
23   (*cinfo->err->output_message) (cinfo);
24
25   /* Return control to the setjmp point */
26   longjmp(myerr->setjmp_buffer, 1);
27 }