+ if (sbr_mode && (aacinfo.encoderDelay & 1)) {
+ /*
+ * Since odd delay cannot be exactly expressed in downsampled scale,
+ * we push one zero frame to the encoder here, to make delay even
+ */
+ int16_t zero[8] = { 0 };
+ aacenc_frame_t frame = { 0 };
+ aac_encode_frame(encoder, sample_format, zero, 1, &frame);
+ free(frame.data);
+ }