Mercurial > mplayer.hg
changeset 25664:a9e6d0744fc4
Avoid uselessly global variables
author | reimar |
---|---|
date | Sat, 12 Jan 2008 14:56:11 +0000 |
parents | 895fe730fa52 |
children | b4dbc6ce32b5 |
files | libmpcodecs/vd_ijpg.c |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpcodecs/vd_ijpg.c Sat Jan 12 14:48:12 2008 +0000 +++ b/libmpcodecs/vd_ijpg.c Sat Jan 12 14:56:11 2008 +0000 @@ -117,18 +117,20 @@ longjmp(myerr->setjmp_buffer, 1); } -static struct jpeg_decompress_struct cinfo; -static struct my_error_mgr jerr; static int row_stride; static unsigned char *temp_row=NULL; // decode a frame 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; int width,height,depth,i; if ( len <= 0 ) return NULL; // skipped frame + memset(&cinfo, 0, sizeof(cinfo)); + memset(&jerr, 0, sizeof(jerr)); cinfo.err=jpeg_std_error( &jerr.pub ); jerr.pub.error_exit=my_error_exit; if( setjmp( jerr.setjmp_buffer ) )