[Mplayer-cvslog] CVS: main/libmpcodecs vd_zlib.c,1.2,1.3

Arpi of Ize arpi at mplayer.dev.hu
Sat Mar 23 17:56:07 CET 2002


Update of /cvsroot/mplayer/main/libmpcodecs
In directory mplayer:/var/tmp.root/cvs-serv5181

Modified Files:
	vd_zlib.c 
Log Message:
10l. IMGFLAG_ALLOCATED shouldn't be set from vd driver\! - it's for internal use by the core

Index: vd_zlib.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vd_zlib.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- vd_zlib.c	23 Mar 2002 16:46:02 -0000	1.2
+++ vd_zlib.c	23 Mar 2002 16:56:05 -0000	1.3
@@ -26,7 +26,6 @@
     int height;
     int depth;
     z_stream zstrm;
-    mp_image_t *mpi;
 } vd_zlib_ctx;
 
 // to set/get/query special features/parameters
@@ -92,6 +91,7 @@
 // decode a frame
 static mp_image_t* decode(sh_video_t *sh, void* data, int len, int flags)
 {
+    mp_image_t *mpi;
     vd_zlib_ctx *ctx = sh->context;
     int zret;
     int decomp_size = ctx->width*ctx->height*((ctx->depth+7)/8);
@@ -100,14 +100,12 @@
     if (len <= 0)
 	return(NULL); // skipped frame
 
-    ctx->mpi = mpcodecs_get_image(sh, MP_IMGTYPE_TEMP, MP_IMGFLAG_ALLOCATED,
-	ctx->width, ctx->height);
-    if (!ctx->mpi)
-	return(NULL);
+    mpi = mpcodecs_get_image(sh, MP_IMGTYPE_TEMP, 0, ctx->width, ctx->height);
+    if (!mpi) return(NULL);
 
     zstrm->next_in = data;
     zstrm->avail_in = len;
-    zstrm->next_out = ctx->mpi->planes[0];
+    zstrm->next_out = mpi->planes[0];
     zstrm->avail_out = decomp_size;
 
     mp_dbg(MSGT_DECVIDEO, MSGL_DBG2, "[vd_zlib] input: %p (%d bytes), output: %p (%d bytes)\n",
@@ -128,6 +126,6 @@
 	return(NULL);
     }
 
-    return(ctx->mpi);
+    return mpi;
 }
 #endif




More information about the MPlayer-cvslog mailing list