Lines Matching defs:avctx

191     AVCodecContext *avctx;
564 static int decoder_init(Decoder *d, AVCodecContext *avctx, PacketQueue *queue, SDL_cond *empty_queue_cond) {
569 d->avctx = avctx;
586 switch (d->avctx->codec_type) {
588 ret = avcodec_receive_frame(d->avctx, frame);
598 ret = avcodec_receive_frame(d->avctx, frame);
602 frame->pts = av_rescale_q(frame->pts, d->avctx->pkt_timebase, tb);
614 avcodec_flush_buffers(d->avctx);
632 avcodec_flush_buffers(d->avctx);
643 if (d->avctx->codec_type == AVMEDIA_TYPE_SUBTITLE) {
645 ret = avcodec_decode_subtitle2(d->avctx, sub, &got_frame, d->pkt);
656 if (avcodec_send_packet(d->avctx, d->pkt) == AVERROR(EAGAIN)) {
657 av_log(d->avctx, AV_LOG_ERROR, "Receive_frame and send_packet both returned EAGAIN, which is an API violation.\n");
668 avcodec_free_context(&d->avctx);
1716 is->video_st ? is->viddec.avctx->pts_correction_num_faulty_dts : 0,
1717 is->video_st ? is->viddec.avctx->pts_correction_num_faulty_pts : 0);
2244 sp->width = is->subdec.avctx->width;
2245 sp->height = is->subdec.avctx->height;
2558 AVCodecContext *avctx;
2571 avctx = avcodec_alloc_context3(NULL);
2572 if (!avctx)
2575 ret = avcodec_parameters_to_context(avctx, ic->streams[stream_index]->codecpar);
2578 avctx->pkt_timebase = ic->streams[stream_index]->time_base;
2580 codec = avcodec_find_decoder(avctx->codec_id);
2582 switch(avctx->codec_type){
2593 "No decoder could be found for codec %s\n", avcodec_get_name(avctx->codec_id));
2598 avctx->codec_id = codec->id;
2600 av_log(avctx, AV_LOG_WARNING, "The maximum value for lowres supported by the decoder is %d\n",
2604 avctx->lowres = stream_lowres;
2607 avctx->flags2 |= AV_CODEC_FLAG2_FAST;
2609 opts = filter_codec_opts(codec_opts, avctx->codec_id, ic, ic->streams[stream_index], codec);
2614 if ((ret = avcodec_open2(avctx, codec, &opts)) < 0) {
2625 switch (avctx->codec_type) {
2631 is->audio_filter_src.freq = avctx->sample_rate;
2632 ret = av_channel_layout_copy(&is->audio_filter_src.ch_layout, &avctx->ch_layout);
2635 is->audio_filter_src.fmt = avctx->sample_fmt;
2645 sample_rate = avctx->sample_rate;
2646 ret = av_channel_layout_copy(&ch_layout, &avctx->ch_layout);
2669 if ((ret = decoder_init(&is->auddec, avctx, &is->audioq, is->continue_read_thread)) < 0)
2683 if ((ret = decoder_init(&is->viddec, avctx, &is->videoq, is->continue_read_thread)) < 0)
2693 if ((ret = decoder_init(&is->subdec, avctx, &is->subtitleq, is->continue_read_thread)) < 0)
2704 avcodec_free_context(&avctx);