summaryrefslogtreecommitdiffstats
path: root/libmpcodecs
diff options
context:
space:
mode:
authorarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-03-23 16:56:05 +0000
committerarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-03-23 16:56:05 +0000
commitb1594708a78d7d003b871d85f5d12bc60e94aa1c (patch)
treefccc99a873f7a8f22f4f78f6c79a8ec62bd2e949 /libmpcodecs
parent8d4022576e7ff5b2b49690037a3cac93b4b30f3f (diff)
downloadmpv-b1594708a78d7d003b871d85f5d12bc60e94aa1c.tar.bz2
mpv-b1594708a78d7d003b871d85f5d12bc60e94aa1c.tar.xz
10l. IMGFLAG_ALLOCATED shouldn't be set from vd driver\! - it's for internal use by the core
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@5278 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs')
-rw-r--r--libmpcodecs/vd_zlib.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/libmpcodecs/vd_zlib.c b/libmpcodecs/vd_zlib.c
index 6b483eaa8e..cbb4dba1e7 100644
--- a/libmpcodecs/vd_zlib.c
+++ b/libmpcodecs/vd_zlib.c
@@ -26,7 +26,6 @@ typedef struct {
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 @@ static void uninit(sh_video_t *sh)
// 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 @@ static mp_image_t* decode(sh_video_t *sh, void* data, int len, int flags)
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 @@ static mp_image_t* decode(sh_video_t *sh, void* data, int len, int flags)
return(NULL);
}
- return(ctx->mpi);
+ return mpi;
}
#endif \ No newline at end of file