static av_cold int roq_dpcm_encode_init(AVCodecContext *avctx)
{
ROQDPCMContext *context = avctx->priv_data;
static av_cold int roq_dpcm_encode_init(AVCodecContext *avctx)
{
ROQDPCMContext *context = avctx->priv_data;
if (avctx->channels > 2) {
av_log(avctx, AV_LOG_ERROR, "Audio must be mono or stereo\n");
if (avctx->channels > 2) {
av_log(avctx, AV_LOG_ERROR, "Audio must be mono or stereo\n");
context->frame_buffer = av_malloc(8 * ROQ_FRAME_SIZE * avctx->channels *
sizeof(*context->frame_buffer));
context->frame_buffer = av_malloc(8 * ROQ_FRAME_SIZE * avctx->channels *
sizeof(*context->frame_buffer));
.name = "roq_dpcm",
.long_name = NULL_IF_CONFIG_SMALL("id RoQ DPCM"),
.type = AVMEDIA_TYPE_AUDIO,
.name = "roq_dpcm",
.long_name = NULL_IF_CONFIG_SMALL("id RoQ DPCM"),
.type = AVMEDIA_TYPE_AUDIO,