• 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

45 static int aac_encode_close(AVCodecContext *avctx)
47 AACContext *s = avctx->priv_data;
50 av_freep(&avctx->extradata);
57 static av_cold int aac_encode_init(AVCodecContext *avctx)
59 AACContext *s = avctx->priv_data;
63 avctx->frame_size = FRAME_SIZE;
64 avctx->delay = ENC_DELAY;
66 ff_af_queue_init(avctx, &s->afq);
68 s->end_buffer = av_mallocz(avctx->frame_size * avctx->channels * 2);
85 params.sampleRate = avctx->sample_rate;
86 params.bitRate = avctx->bit_rate;
87 params.nChannels = avctx->channels;
88 params.adtsUsed = !(avctx->flags & CODEC_FLAG_GLOBAL_HEADER);
91 av_log(avctx, AV_LOG_ERROR, "Unable to set encoding parameters\n");
97 if (avctx->sample_rate == avpriv_mpeg4audio_sample_rates[index])
100 av_log(avctx, AV_LOG_ERROR, "Unsupported sample rate %d\n",
101 avctx->sample_rate);
105 if (avctx->flags & CODEC_FLAG_GLOBAL_HEADER) {
106 avctx->extradata_size = 2;
107 avctx->extradata = av_mallocz(avctx->extradata_size +
109 if (!avctx->extradata) {
114 avctx->extradata[0] = 0x02 << 3 | index >> 1;
115 avctx->extradata[1] = (index & 0x01) << 7 | avctx->channels << 3;
119 aac_encode_close(avctx);
123 static int aac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
126 AACContext *s = avctx->priv_data;
141 memset(s->end_buffer, 0, 2 * avctx->channels * avctx->frame_size);
144 if (frame->nb_samples < avctx->frame_size) {
146 memcpy(s->end_buffer, frame->data[0], 2 * avctx->channels * frame->nb_samples);
156 if ((ret = ff_alloc_packet2(avctx, avpkt, FFMAX(8192, 768 * avctx->channels))) < 0)
160 input.Length = 2 * avctx->channels * avctx->frame_size;
167 av_log(avctx, AV_LOG_ERROR, "Unable to encode frame\n");
172 ff_af_queue_remove(&s->afq, avctx->frame_size, &avpkt->pts,