Lines Matching defs:avctx
85 static int my_ass_subtitle_header(AVCodecContext *avctx)
87 int ret = ff_ass_subtitle_header_default(avctx);
94 event_pos = strstr(avctx->subtitle_header, "\r\n[Events]\r\n");
99 (int)(event_pos - avctx->subtitle_header), avctx->subtitle_header,
125 av_free(avctx->subtitle_header);
126 avctx->subtitle_header = new_header;
127 avctx->subtitle_header_size = strlen(new_header);
640 static int teletext_decode_frame(AVCodecContext *avctx, AVSubtitle *sub,
643 TeletextContext *ctx = avctx->priv_data;
650 av_log(avctx, AV_LOG_INFO, "Setting default zvbi region to %i\n", ctx->default_region);
660 if (avctx->pkt_timebase.num && pkt->pts != AV_NOPTS_VALUE)
661 ctx->pts = av_rescale_q(pkt->pts, avctx->pkt_timebase, AV_TIME_BASE_Q);
676 ff_dlog(avctx, "ctx=%p buf_size=%d lines=%u pkt_pts=%7.3f\n",
708 av_log(avctx, AV_LOG_DEBUG, "sending empty sub\n");
726 static int teletext_init_decoder(AVCodecContext *avctx)
728 TeletextContext *ctx = avctx->priv_data;
733 av_log(avctx, AV_LOG_ERROR, "decoder needs zvbi version >= 0.2.26.\n");
738 avctx->width = 41 * BITMAP_CHAR_WIDTH;
739 avctx->height = 25 * BITMAP_CHAR_HEIGHT;
750 av_log(avctx, AV_LOG_VERBOSE, "page filter: %s\n", ctx->pgno);
756 return ff_ass_subtitle_header_default(avctx);
758 return my_ass_subtitle_header(avctx);
763 static int teletext_close_decoder(AVCodecContext *avctx)
765 TeletextContext *ctx = avctx->priv_data;
767 ff_dlog(avctx, "lines_total=%u\n", ctx->lines_processed);
778 if (!(avctx->flags2 & AV_CODEC_FLAG2_RO_FLUSH_NOOP))
783 static void teletext_flush(AVCodecContext *avctx)
785 teletext_close_decoder(avctx);