# HG changeset patch # User alex # Date 1016901962 0 # Node ID 8037d34ce8067f848221b05b015dd668a8500cc6 # Parent 38f45e170f3b887713fbb183cd3422fc46d9ed5d moved get_image into decoder (Arpi's request) diff -r 38f45e170f3b -r 8037d34ce806 libmpcodecs/vd_zlib.c --- a/libmpcodecs/vd_zlib.c Sat Mar 23 16:36:42 2002 +0000 +++ b/libmpcodecs/vd_zlib.c Sat Mar 23 16:46:02 2002 +0000 @@ -73,10 +73,6 @@ 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 @@ 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];