avcodec/aacps: Fix undefined behavior