What we do now: 1. Set RA unit size to near 10 seconds, with each frame based on original avctx->frame_size. 2. Multiply avctx->frame_size by RA unit size. What we need to do: - Allow user to set RA unit size through avctx->gop_size. - Buffer frames internally until we have an RA unit or end-of-stream. - If current call to encode_frame() will return the encoded RA unit, set avctx->coded_frame->pts and return encoded RA unit size in bytes. - If current call to encode_frame() only adds to the buffer, leave avctx->coded_frame->pts as-is and return 0.
What we do now:
What we need to do: