lavc: replace AVCodecContext.encode with subtitle-specific callback