+
+ /* copy input samples to current block for processing in next call */
+ i = 0;
+ if (frame) {
+ for (; i < frame->nb_samples; i++)
+ ractx->curr_block[i] = samples[i] >> 2;
+
+ if ((ret = ff_af_queue_add(&ractx->afq, frame) < 0))
+ return ret;
+ } else
+ ractx->last_frame = 1;
+ memset(&ractx->curr_block[i], 0,
+ (NBLOCKS * BLOCKSIZE - i) * sizeof(*ractx->curr_block));
+
+ /* Get the next frame pts/duration */
+ ff_af_queue_remove(&ractx->afq, avctx->frame_size, &avpkt->pts,
+ &avpkt->duration);
+
+ avpkt->size = FRAMESIZE;
+ *got_packet_ptr = 1;
+ return 0;