Lines Matching refs:avctx
138 static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
142 CamStudioContext *c = avctx->priv_data;
146 av_log(avctx, AV_LOG_ERROR, "coded frame too small\n");
151 avctx->release_buffer(avctx, &c->pic);
155 if (avctx->get_buffer(avctx, &c->pic) < 0) {
156 av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
165 av_log(avctx, AV_LOG_ERROR, "error during lzo decompression\n");
172 av_log(avctx, AV_LOG_ERROR, "error during zlib decompression\n");
175 av_log(avctx, AV_LOG_ERROR, "compiled without zlib support\n");
180 av_log(avctx, AV_LOG_ERROR, "unknown compression\n");
220 static av_cold int decode_init(AVCodecContext *avctx) {
221 CamStudioContext *c = avctx->priv_data;
223 switch (avctx->bits_per_coded_sample) {
224 case 16: avctx->pix_fmt = PIX_FMT_RGB555; break;
225 case 24: avctx->pix_fmt = PIX_FMT_BGR24; break;
226 case 32: avctx->pix_fmt = PIX_FMT_RGB32; break;
228 av_log(avctx, AV_LOG_ERROR,
230 avctx->bits_per_coded_sample);
233 c->bpp = avctx->bits_per_coded_sample;
235 c->linelen = avctx->width * avctx->bits_per_coded_sample / 8;
236 c->height = avctx->height;
238 if (avctx->bits_per_coded_sample == 24)
243 av_log(avctx, AV_LOG_ERROR, "Can't allocate decompression buffer.\n");
249 static av_cold int decode_end(AVCodecContext *avctx) {
250 CamStudioContext *c = avctx->priv_data;
253 avctx->release_buffer(avctx, &c->pic);