avcodec/utils: Check bits_per_coded_sample