comparison libmpcodecs/vd_zlib.c @ 5276:8037d34ce806

moved get_image into decoder (Arpi's request)
author alex
date Sat, 23 Mar 2002 16:46:02 +0000
parents 7c1425197af0
children 7df9fc3308ac
comparison
equal deleted inserted replaced
5275:38f45e170f3b 5276:8037d34ce806
71 } 71 }
72 72
73 if (!mpcodecs_config_vo(sh, ctx->width, ctx->height, IMGFMT_BGR|ctx->depth)) 73 if (!mpcodecs_config_vo(sh, ctx->width, ctx->height, IMGFMT_BGR|ctx->depth))
74 return(NULL); 74 return(NULL);
75 75
76 ctx->mpi = mpcodecs_get_image(sh, MP_IMGTYPE_TEMP, MP_IMGFLAG_ALLOCATED,
77 ctx->width, ctx->height);
78 if (!ctx->mpi)
79 return(NULL);
80 76
81 return(1); 77 return(1);
82 } 78 }
83 79
84 // uninit driver 80 // uninit driver
102 z_stream *zstrm = &ctx->zstrm; 98 z_stream *zstrm = &ctx->zstrm;
103 99
104 if (len <= 0) 100 if (len <= 0)
105 return(NULL); // skipped frame 101 return(NULL); // skipped frame
106 102
103 ctx->mpi = mpcodecs_get_image(sh, MP_IMGTYPE_TEMP, MP_IMGFLAG_ALLOCATED,
104 ctx->width, ctx->height);
105 if (!ctx->mpi)
106 return(NULL);
107
107 zstrm->next_in = data; 108 zstrm->next_in = data;
108 zstrm->avail_in = len; 109 zstrm->avail_in = len;
109 zstrm->next_out = ctx->mpi->planes[0]; 110 zstrm->next_out = ctx->mpi->planes[0];
110 zstrm->avail_out = decomp_size; 111 zstrm->avail_out = decomp_size;
111 112