aboutsummaryrefslogtreecommitdiffhomepage
path: root/libmpcodecs
diff options
context:
space:
mode:
authorGravatar reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-01-12 14:56:11 +0000
committerGravatar reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-01-12 14:56:11 +0000
commite15487b068de47cd6b0a8b6d8e8f6fba784078b4 (patch)
treef04bf5d996b6013465a94916422b762692de16fd /libmpcodecs
parentb78083276562c0391e200be6a6bf0ca87fd426cd (diff)
Avoid uselessly global variables
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25692 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs')
-rw-r--r--libmpcodecs/vd_ijpg.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libmpcodecs/vd_ijpg.c b/libmpcodecs/vd_ijpg.c
index cee851b58b..4e0c62d6d4 100644
--- a/libmpcodecs/vd_ijpg.c
+++ b/libmpcodecs/vd_ijpg.c
@@ -117,18 +117,20 @@ METHODDEF(void) my_error_exit (j_common_ptr cinfo)
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 ) )