Replace assertions by checks in ROStreamReadBitsUX (#2457)

diff --git a/src/stream.c b/src/stream.c
index 45a5ff0..f220fed 100644
--- a/src/stream.c
+++ b/src/stream.c
@@ -162,7 +162,7 @@
 
 avifBool avifROStreamReadBitsU8(avifROStream * stream, uint8_t * v, size_t bitCount)
 {
-    assert(bitCount <= sizeof(*v) * 8);
+    AVIF_CHECK(bitCount <= sizeof(*v) * 8);
     uint32_t vU32;
     AVIF_CHECK(avifROStreamReadBitsU32(stream, &vU32, bitCount));
     *v = (uint8_t)vU32;
@@ -171,7 +171,7 @@
 
 avifBool avifROStreamReadBitsU16(avifROStream * stream, uint16_t * v, size_t bitCount)
 {
-    assert(bitCount <= sizeof(*v) * 8);
+    AVIF_CHECK(bitCount <= sizeof(*v) * 8);
     uint32_t vU32;
     AVIF_CHECK(avifROStreamReadBitsU32(stream, &vU32, bitCount));
     *v = (uint16_t)vU32;
@@ -180,7 +180,7 @@
 
 avifBool avifROStreamReadBitsU32(avifROStream * stream, uint32_t * v, size_t bitCount)
 {
-    assert(bitCount <= sizeof(*v) * 8);
+    AVIF_CHECK(bitCount <= sizeof(*v) * 8);
     *v = 0;
     while (bitCount) {
         if (stream->numUsedBitsInPartialByte == 0) {