diff options
author | alex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-03-23 16:46:02 +0000 |
---|---|---|
committer | alex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-03-23 16:46:02 +0000 |
commit | 8d4022576e7ff5b2b49690037a3cac93b4b30f3f (patch) | |
tree | a3ad53204c7878f3e9f401ca67098679b8abb16f /libmpcodecs | |
parent | 1dccf216e69ccb3cb8a43198908f65f6698c280d (diff) | |
download | mpv-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')
-rw-r--r-- | libmpcodecs/vd_zlib.c | 9 |
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]; |