• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/minidlna/ffmpeg-2.3.4/libavcodec/

Lines Matching refs:avctx

48     AVCodecContext *avctx;
80 av_log(s->avctx, AV_LOG_ERROR, "CRC error\n");
102 static int allocate_buffers(AVCodecContext *avctx)
104 TTAContext *s = avctx->priv_data;
112 s->ch_ctx = av_malloc_array(avctx->channels, sizeof(*s->ch_ctx));
121 static av_cold int tta_decode_init(AVCodecContext * avctx)
123 TTAContext *s = avctx->priv_data;
127 s->avctx = avctx;
130 if (avctx->extradata_size < 22)
134 init_get_bits8(&gb, avctx->extradata, avctx->extradata_size);
141 av_log(avctx, AV_LOG_ERROR, "Invalid format\n");
146 av_log(avctx, AV_LOG_ERROR, "Missing password for encrypted stream. Please use the -password option\n");
151 avctx->channels = s->channels = get_bits(&gb, 16);
153 avctx->channel_layout = tta_channel_layouts[s->channels-2];
154 avctx->bits_per_raw_sample = get_bits(&gb, 16);
155 s->bps = (avctx->bits_per_raw_sample + 7) / 8;
156 avctx->sample_rate = get_bits_long(&gb, 32);
161 av_log(avctx, AV_LOG_ERROR, "Invalid number of channels\n");
163 } else if (avctx->sample_rate == 0) {
164 av_log(avctx, AV_LOG_ERROR, "Invalid samplerate\n");
169 case 1: avctx->sample_fmt = AV_SAMPLE_FMT_U8; break;
171 avctx->sample_fmt = AV_SAMPLE_FMT_S16;
174 avctx->sample_fmt = AV_SAMPLE_FMT_S32;
176 //case 4: avctx->sample_fmt = AV_SAMPLE_FMT_S32; break;
178 av_log(avctx, AV_LOG_ERROR, "Invalid/unsupported sample format.\n");
183 if (avctx->sample_rate > 0x7FFFFFu) {
184 av_log(avctx, AV_LOG_ERROR, "sample_rate too large\n");
187 s->frame_length = 256 * avctx->sample_rate / 245;
193 av_log(avctx, AV_LOG_DEBUG, "format: %d chans: %d bps: %d rate: %d block: %d\n",
194 s->format, avctx->channels, avctx->bits_per_coded_sample, avctx->sample_rate,
195 avctx->block_align);
196 av_log(avctx, AV_LOG_DEBUG, "data_length: %d frame_length: %d last: %d total: %d\n",
200 av_log(avctx, AV_LOG_ERROR, "frame_length too large\n");
204 av_log(avctx, AV_LOG_ERROR, "Wrong extradata present\n");
210 return allocate_buffers(avctx);
213 static int tta_decode_frame(AVCodecContext *avctx, void *data,
220 TTAContext *s = avctx->priv_data;
226 if (avctx->err_recognition & AV_EF_CRCCHECK) {
228 (tta_check_crc(s, buf, buf_size - 4) && avctx->err_recognition & AV_EF_EXPLODE))
237 if ((ret = ff_thread_get_buffer(avctx, &tframe, 0)) < 0)
386 static int init_thread_copy(AVCodecContext *avctx)
388 TTAContext *s = avctx->priv_data;
389 s->avctx = avctx;
390 return allocate_buffers(avctx);
393 static av_cold int tta_decode_close(AVCodecContext *avctx) {
394 TTAContext *s = avctx->priv_data;