avcodec/ac3enc_template: fix out of array read