[MPlayer-cvslog] r22095 - trunk/libmpcodecs/vd_lzo.c
reimar
subversion at mplayerhq.hu
Wed Jan 31 23:15:51 CET 2007
Author: reimar
Date: Wed Jan 31 23:15:51 2007
New Revision: 22095
Modified:
trunk/libmpcodecs/vd_lzo.c
Log:
Avoid a static variable and instead use variable in context
Modified: trunk/libmpcodecs/vd_lzo.c
==============================================================================
--- trunk/libmpcodecs/vd_lzo.c (original)
+++ trunk/libmpcodecs/vd_lzo.c Wed Jan 31 23:15:51 2007
@@ -91,7 +91,6 @@
// decode a frame
static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags)
{
- static int init_done = 0;
int r;
mp_image_t* mpi;
int w;
@@ -102,7 +101,7 @@
}
- if (!init_done) {
+ if (priv->codec == -1) {
lzo_byte *tmp = lzo_malloc(sh->bih->biSizeImage);
// decompress one frame to see if its
@@ -135,8 +134,10 @@
return NULL;
}
- if(!mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,priv->codec)) return NULL;
- init_done++;
+ if(!mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,priv->codec)) {
+ priv->codec = -1;
+ return NULL;
+ }
}
mpi = mpcodecs_get_image(sh, MP_IMGTYPE_TEMP, 0,
More information about the MPlayer-cvslog
mailing list