Lines Matching refs:dec_ctx

52     AVCodecContext *dec_ctx;
110 stream_ctx[i].dec_ctx = codec_ctx;
125 AVCodecContext *dec_ctx, *enc_ctx;
146 dec_ctx = stream_ctx[i].dec_ctx;
148 if (dec_ctx->codec_type == AVMEDIA_TYPE_VIDEO
149 || dec_ctx->codec_type == AVMEDIA_TYPE_AUDIO) {
151 encoder = avcodec_find_encoder(dec_ctx->codec_id);
165 if (dec_ctx->codec_type == AVMEDIA_TYPE_VIDEO) {
166 enc_ctx->height = dec_ctx->height;
167 enc_ctx->width = dec_ctx->width;
168 enc_ctx->sample_aspect_ratio = dec_ctx->sample_aspect_ratio;
173 enc_ctx->pix_fmt = dec_ctx->pix_fmt;
175 enc_ctx->time_base = av_inv_q(dec_ctx->framerate);
177 enc_ctx->sample_rate = dec_ctx->sample_rate;
178 ret = av_channel_layout_copy(&enc_ctx->ch_layout, &dec_ctx->ch_layout);
203 } else if (dec_ctx->codec_type == AVMEDIA_TYPE_UNKNOWN) {
237 static int init_filter(FilteringContext* fctx, AVCodecContext *dec_ctx,
255 if (dec_ctx->codec_type == AVMEDIA_TYPE_VIDEO) {
266 dec_ctx->width, dec_ctx->height, dec_ctx->pix_fmt,
267 dec_ctx->time_base.num, dec_ctx->time_base.den,
268 dec_ctx->sample_aspect_ratio.num,
269 dec_ctx->sample_aspect_ratio.den);
292 } else if (dec_ctx->codec_type == AVMEDIA_TYPE_AUDIO) {
302 if (dec_ctx->ch_layout.order == AV_CHANNEL_ORDER_UNSPEC)
303 av_channel_layout_default(&dec_ctx->ch_layout, dec_ctx->ch_layout.nb_channels);
304 av_channel_layout_describe(&dec_ctx->ch_layout, buf, sizeof(buf));
307 dec_ctx->time_base.num, dec_ctx->time_base.den, dec_ctx->sample_rate,
308 av_get_sample_fmt_name(dec_ctx->sample_fmt),
409 ret = init_filter(&filter_ctx[i], stream_ctx[i].dec_ctx,
547 stream->dec_ctx->time_base);
548 ret = avcodec_send_packet(stream->dec_ctx, packet);
555 ret = avcodec_receive_frame(stream->dec_ctx, stream->dec_frame);
602 avcodec_free_context(&stream_ctx[i].dec_ctx);