summaryrefslogtreecommitdiffstats
path: root/libmpcodecs/vd_zlib.c
diff options
context:
space:
mode:
authoralex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-03-23 16:46:02 +0000
committeralex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-03-23 16:46:02 +0000
commit8d4022576e7ff5b2b49690037a3cac93b4b30f3f (patch)
treea3ad53204c7878f3e9f401ca67098679b8abb16f /libmpcodecs/vd_zlib.c
parent1dccf216e69ccb3cb8a43198908f65f6698c280d (diff)
downloadmpv-8d4022576e7ff5b2b49690037a3cac93b4b30f3f.tar.bz2
mpv-8d4022576e7ff5b2b49690037a3cac93b4b30f3f.tar.xz
moved get_image into decoder (Arpi's request)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@5277 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs/vd_zlib.c')
-rw-r--r--libmpcodecs/vd_zlib.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/libmpcodecs/vd_zlib.c b/libmpcodecs/vd_zlib.c
index 9e734989af..6b483eaa8e 100644
--- a/libmpcodecs/vd_zlib.c
+++ b/libmpcodecs/vd_zlib.c
@@ -73,10 +73,6 @@ static int init(sh_video_t *sh)
if (!mpcodecs_config_vo(sh, ctx->width, ctx->height, IMGFMT_BGR|ctx->depth))
return(NULL);
- ctx->mpi = mpcodecs_get_image(sh, MP_IMGTYPE_TEMP, MP_IMGFLAG_ALLOCATED,
- ctx->width, ctx->height);
- if (!ctx->mpi)
- return(NULL);
return(1);
}
@@ -104,6 +100,11 @@ 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);
+
zstrm->next_in = data;
zstrm->avail_in = len;
zstrm->next_out = ctx->mpi->planes[0];