Lines Matching refs:avctx
276 static int atrac1_decode_frame(AVCodecContext *avctx, void *data,
281 AT1Ctx *q = avctx->priv_data;
288 av_log(avctx, AV_LOG_ERROR, "Not enough data to decode!\n");
294 if ((ret = avctx->get_buffer(avctx, &q->frame)) < 0) {
295 av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
329 return avctx->block_align;
333 static av_cold int atrac1_decode_end(AVCodecContext * avctx)
335 AT1Ctx *q = avctx->priv_data;
347 static av_cold int atrac1_decode_init(AVCodecContext *avctx)
349 AT1Ctx *q = avctx->priv_data;
352 avctx->sample_fmt = AV_SAMPLE_FMT_FLT;
354 if (avctx->channels < 1 || avctx->channels > AT1_MAX_CHANNELS) {
355 av_log(avctx, AV_LOG_ERROR, "Unsupported number of channels: %d\n",
356 avctx->channels);
359 q->channels = avctx->channels;
361 if (avctx->channels == 2) {
374 av_log(avctx, AV_LOG_ERROR, "Error initializing MDCT\n");
375 atrac1_decode_end(avctx);
383 dsputil_init(&q->dsp, avctx);
384 ff_fmt_convert_init(&q->fmt_conv, avctx);
397 avctx->coded_frame = &q->frame;