• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/iserver/libav-0.8.8/libavcodec/

Lines Matching refs:avctx

59     AVCodecContext *avctx;
201 av_log(s->avctx, AV_LOG_ERROR, "CRC error\n");
208 static av_cold int tta_decode_init(AVCodecContext * avctx)
210 TTAContext *s = avctx->priv_data;
212 s->avctx = avctx;
215 if (avctx->extradata_size < 30)
218 init_get_bits(&s->gb, avctx->extradata, avctx->extradata_size * 8);
221 if (avctx->err_recognition & AV_EF_CRCCHECK) {
223 if (tta_check_crc(s, avctx->extradata, 18))
232 av_log(s->avctx, AV_LOG_ERROR, "Invalid format\n");
236 av_log_missing_feature(s->avctx, "Encrypted TTA", 0);
239 avctx->channels = s->channels = get_bits(&s->gb, 16);
240 avctx->bits_per_coded_sample = get_bits(&s->gb, 16);
241 s->bps = (avctx->bits_per_coded_sample + 7) / 8;
242 avctx->sample_rate = get_bits_long(&s->gb, 32);
247 av_log(s->avctx, AV_LOG_ERROR, "Invalid number of channels\n");
249 } else if (avctx->sample_rate == 0) {
250 av_log(s->avctx, AV_LOG_ERROR, "Invalid samplerate\n");
256 avctx->sample_fmt = AV_SAMPLE_FMT_S16;
257 avctx->bits_per_raw_sample = 16;
260 avctx->sample_fmt = AV_SAMPLE_FMT_S32;
261 avctx->bits_per_raw_sample = 24;
264 av_log(avctx, AV_LOG_ERROR, "Invalid/unsupported sample format.\n");
269 if (avctx->sample_rate > 0x7FFFFFu) {
270 av_log(avctx, AV_LOG_ERROR, "sample_rate too large\n");
273 s->frame_length = 256 * avctx->sample_rate / 245;
279 av_log(s->avctx, AV_LOG_DEBUG, "format: %d chans: %d bps: %d rate: %d block: %d\n",
280 s->format, avctx->channels, avctx->bits_per_coded_sample, avctx->sample_rate,
281 avctx->block_align);
282 av_log(s->avctx, AV_LOG_DEBUG, "data_length: %d frame_length: %d last: %d total: %d\n",
286 if (avctx->extradata_size <= 26 || s->total_frames > INT_MAX / 4 ||
287 avctx->extradata_size - 26 < s->total_frames * 4)
288 av_log(avctx, AV_LOG_WARNING, "Seek table missing or too small\n");
289 else if (avctx->err_recognition & AV_EF_CRCCHECK) {
290 if (tta_check_crc(s, avctx->extradata + 22, s->total_frames * 4))
297 av_log(avctx, AV_LOG_ERROR, "frame_length too large\n");
306 s->ch_ctx = av_malloc(avctx->channels * sizeof(*s->ch_ctx));
312 av_log(avctx, AV_LOG_ERROR, "Wrong extradata present\n");
317 avctx->coded_frame = &s->frame;
322 static int tta_decode_frame(AVCodecContext *avctx, void *data,
327 TTAContext *s = avctx->priv_data;
332 if (avctx->err_recognition & AV_EF_CRCCHECK) {
346 if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) {
347 av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
462 static av_cold int tta_decode_close(AVCodecContext *avctx) {
463 TTAContext *s = avctx->priv_data;