+ /* get output buffer */
+ block_size = (avctx->bits_per_coded_sample + 4) / 4;
+ s->frame.nb_samples = 2 * (buf_size / block_size) / avctx->channels;
+ if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) {
+ av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
+ return ret;
+ }
+
+ buf_size = (s->frame.nb_samples * avctx->channels / 2) * block_size;