+ blockstodecode = FFMIN(BLOCKS_PER_LOOP, s->samples);
+
+ out_size = blockstodecode * avctx->channels *
+ av_get_bytes_per_sample(avctx->sample_fmt);
+ if (*data_size < out_size) {
+ av_log(avctx, AV_LOG_ERROR, "Output buffer is too small.\n");
+ return AVERROR(EINVAL);
+ }