Lines Matching refs:avctx
115 static av_cold int dpcm_decode_init(AVCodecContext *avctx)
117 DPCMContext *s = avctx->priv_data;
120 if (avctx->channels < 1 || avctx->channels > 2) {
121 av_log(avctx, AV_LOG_INFO, "invalid number of channels\n");
125 s->channels = avctx->channels;
128 switch(avctx->codec->id) {
140 switch(avctx->codec_tag){
152 av_log(avctx, AV_LOG_ERROR, "Unknown SOL subcodec\n");
161 if (avctx->codec->id == CODEC_ID_SOL_DPCM && avctx->codec_tag != 3)
162 avctx->sample_fmt = AV_SAMPLE_FMT_U8;
164 avctx->sample_fmt = AV_SAMPLE_FMT_S16;
167 avctx->coded_frame = &s->frame;
173 static int dpcm_decode_frame(AVCodecContext *avctx, void *data,
179 DPCMContext *s = avctx->priv_data;
192 switch(avctx->codec->id) {
203 if (avctx->codec_tag != 3)
210 av_log(avctx, AV_LOG_ERROR, "packet is too small\n");
216 if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) {
217 av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
222 switch(avctx->codec->id) {
295 if (avctx->codec_tag != 3) {