Lines Matching defs:avctx
165 static av_cold int amrnb_decode_init(AVCodecContext *avctx)
167 AMRChannelsContext *s = avctx->priv_data;
170 if (avctx->ch_layout.nb_channels > 2) {
171 avpriv_report_missing_feature(avctx, ">2 channel AMR");
175 if (!avctx->ch_layout.nb_channels) {
176 av_channel_layout_uninit(&avctx->ch_layout);
177 avctx->ch_layout = (AVChannelLayout)AV_CHANNEL_LAYOUT_MONO;
179 if (!avctx->sample_rate)
180 avctx->sample_rate = 8000;
181 avctx->sample_fmt = AV_SAMPLE_FMT_FLTP;
183 for (int ch = 0; ch < avctx->ch_layout.nb_channels; ch++) {
958 static int amrnb_decode_frame(AVCodecContext *avctx, AVFrame *frame,
962 AMRChannelsContext *s = avctx->priv_data; // pointer to private data
969 if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
972 for (int ch = 0; ch < avctx->ch_layout.nb_channels; ch++) {
985 av_log(avctx, AV_LOG_ERROR, "Corrupt bitstream\n");
989 avpriv_report_missing_feature(avctx, "dtx mode");
990 av_log(avctx, AV_LOG_INFO, "Note: libopencore_amrnb supports dtx\n");
1021 av_log(avctx, AV_LOG_ERROR, "The file is corrupted, pitch_lag = 0 is not allowed\n");