avcodec/shorten: Sanity check nmeans