avcodec/g2meet: Change order of operations to avoid undefined behavior