Lines Matching defs:avctx
59 AVCodecContext *avctx;
91 static av_cold int flashsv_encode_end(AVCodecContext *avctx)
93 FlashSVContext *s = avctx->priv_data;
101 static av_cold int flashsv_encode_init(AVCodecContext *avctx)
103 FlashSVContext *s = avctx->priv_data;
105 s->avctx = avctx;
107 if (avctx->width > 4095 || avctx->height > 4095) {
108 av_log(avctx, AV_LOG_ERROR,
115 s->image_width = avctx->width;
116 s->image_height = avctx->height;
121 av_log(avctx, AV_LOG_ERROR, "Memory allocation failed.\n");
179 av_log(s->avctx, AV_LOG_ERROR,
184 ff_dlog(s->avctx, "buf_pos = %d\n", buf_pos);
202 static int flashsv_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
205 FlashSVContext * const s = avctx->priv_data;
213 if (avctx->frame_number == 0) {
216 av_log(avctx, AV_LOG_ERROR, "Memory allocation failed.\n");
228 if (avctx->gop_size > 0 &&
229 avctx->frame_number >= s->last_key_frame + avctx->gop_size) {
233 if ((res = ff_alloc_packet(avctx, pkt, s->image_width * s->image_height * 3)) < 0)
249 s->last_key_frame = avctx->frame_number;
250 ff_dlog(avctx, "Inserting keyframe at frame %d\n", avctx->frame_number);