}
memcpy(outbuf, o_packet.packet, o_packet.bytes);
- // HACK: does not take codec delay into account (neither does the decoder though)
+ // HACK: assumes no encoder delay, this is true until libtheora becomes
+ // multithreaded (which will be disabled unless explictly requested)
avc_context->coded_frame->pts = frame->pts;
avc_context->coded_frame->key_frame = !(o_packet.granulepos & h->keyframe_mask);
/*! AVCodec struct exposed to libavcodec */
AVCodec libtheora_encoder = {
.name = "libtheora",
- .type = CODEC_TYPE_VIDEO,
+ .type = AVMEDIA_TYPE_VIDEO,
.id = CODEC_ID_THEORA,
.priv_data_size = sizeof(TheoraContext),
.init = encode_init,