Lines Matching defs:enc_ctx
52 static int init_encoder(const AVCodec *enc, AVCodecContext **enc_ctx,
78 *enc_ctx = ctx;
108 AVCodecContext *enc_ctx, AVCodecContext *dec_ctx)
130 in_frame->nb_samples = enc_ctx->frame_size;
131 in_frame->format = enc_ctx->sample_fmt;
132 result = av_channel_layout_copy(&in_frame->ch_layout, &enc_ctx->ch_layout);
163 generate_raw_frame((uint16_t*)(in_frame->data[0]), i, enc_ctx->sample_rate,
164 enc_ctx->ch_layout.nb_channels, enc_ctx->frame_size);
172 result = avcodec_send_frame(enc_ctx, in_frame);
179 result = avcodec_receive_packet(enc_ctx, enc_pkt);
249 AVCodecContext *enc_ctx = NULL, *dec_ctx = NULL;
271 if (init_encoder(enc, &enc_ctx, &channel_layouts[cl], sample_rates[sr]) != 0)
275 if (run_test(enc, dec, enc_ctx, dec_ctx) != 0)
277 avcodec_free_context(&enc_ctx);