We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 2582234 + c123e69 commit 118200fCopy full SHA for 118200f
lib/common/bitstream.h
@@ -411,7 +411,7 @@ MEM_STATIC BIT_DStream_status BIT_reloadDStreamFast(BIT_DStream_t* bitD)
411
FORCE_INLINE_TEMPLATE BIT_DStream_status BIT_reloadDStream(BIT_DStream_t* bitD)
412
{
413
/* note : once in overflow mode, a bitstream remains in this mode until it's reset */
414
- if (bitD->bitsConsumed > (sizeof(bitD->bitContainer)*8)) {
+ if (UNLIKELY(bitD->bitsConsumed > (sizeof(bitD->bitContainer)*8))) {
415
static const BitContainerType zeroFilled = 0;
416
bitD->ptr = (const char*)&zeroFilled; /* aliasing is allowed for char */
417
/* overflow detected, erroneous scenario or end of stream: no update */
0 commit comments