mirror of https://github.com/mpv-player/mpv
Avoid uselessly global variables
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25692 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
b780832765
commit
e15487b068
|
@ -117,18 +117,20 @@ METHODDEF(void) my_error_exit (j_common_ptr cinfo)
|
||||||
longjmp(myerr->setjmp_buffer, 1);
|
longjmp(myerr->setjmp_buffer, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct jpeg_decompress_struct cinfo;
|
|
||||||
static struct my_error_mgr jerr;
|
|
||||||
static int row_stride;
|
static int row_stride;
|
||||||
static unsigned char *temp_row=NULL;
|
static unsigned char *temp_row=NULL;
|
||||||
|
|
||||||
// decode a frame
|
// decode a frame
|
||||||
static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){
|
static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){
|
||||||
|
struct jpeg_decompress_struct cinfo;
|
||||||
|
struct my_error_mgr jerr;
|
||||||
mp_image_t * mpi = NULL;
|
mp_image_t * mpi = NULL;
|
||||||
int width,height,depth,i;
|
int width,height,depth,i;
|
||||||
|
|
||||||
if ( len <= 0 ) return NULL; // skipped frame
|
if ( len <= 0 ) return NULL; // skipped frame
|
||||||
|
|
||||||
|
memset(&cinfo, 0, sizeof(cinfo));
|
||||||
|
memset(&jerr, 0, sizeof(jerr));
|
||||||
cinfo.err=jpeg_std_error( &jerr.pub );
|
cinfo.err=jpeg_std_error( &jerr.pub );
|
||||||
jerr.pub.error_exit=my_error_exit;
|
jerr.pub.error_exit=my_error_exit;
|
||||||
if( setjmp( jerr.setjmp_buffer ) )
|
if( setjmp( jerr.setjmp_buffer ) )
|
||||||
|
|
Loading…
Reference in New Issue