Lines Matching refs:in_frame
111 AVFrame *in_frame, *out_frame;
124 in_frame = av_frame_alloc();
125 if (!in_frame) {
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);
135 if (av_frame_get_buffer(in_frame, 0) != 0) {
146 raw_in = av_malloc(in_frame->linesize[0] * NUMBER_OF_AUDIO_FRAMES);
152 raw_out = av_malloc(in_frame->linesize[0] * NUMBER_OF_AUDIO_FRAMES);
159 result = av_frame_make_writable(in_frame);
163 generate_raw_frame((uint16_t*)(in_frame->data[0]), i, enc_ctx->sample_rate,
165 in_frame_bytes = in_frame->nb_samples * in_frame->ch_layout.nb_channels * sizeof(uint16_t);
166 if (in_frame_bytes > in_frame->linesize[0]) {
170 memcpy(raw_in + in_offset, in_frame->data[0], in_frame_bytes);
172 result = avcodec_send_frame(enc_ctx, in_frame);
207 if (in_frame->nb_samples != out_frame->nb_samples) {
212 if (av_channel_layout_compare(&in_frame->ch_layout, &out_frame->ch_layout)) {
217 if (in_frame->format != out_frame->format) {
241 av_frame_free(&in_frame);