init_put_bits(&s->pb, frame, AC3_MAX_CODED_FRAME_SIZE);
- if (CONFIG_EAC3_ENCODER && s->eac3)
- ff_eac3_output_frame_header(s);
- else
- ac3_output_frame_header(s);
+ s->output_frame_header(s);
for (blk = 0; blk < AC3_MAX_BLOCKS; blk++)
output_audio_block(s, blk);
s->crc_inv[1] = pow_poly((CRC16_POLY >> 1), (8 * frame_size_58) - 16, CRC16_POLY);
}
+ /* set function pointers */
+ if (CONFIG_EAC3_ENCODER && s->eac3)
+ s->output_frame_header = ff_eac3_output_frame_header;
+ else
+ s->output_frame_header = ac3_output_frame_header;
+
set_bandwidth(s);
exponent_init(s);
int ref_bap_set; ///< indicates if ref_bap pointers have been set
DECLARE_ALIGNED(32, SampleType, windowed_samples)[AC3_WINDOW_SIZE];
+
+ void (*output_frame_header)(struct AC3EncodeContext *s);
} AC3EncodeContext;
#endif /* AVCODEC_AC3ENC_H */