/**
* Read an unsigned Exp-Golomb code in the range 0 to 8190.
+ *
+ * @returns the read value or a negative error code.
*/
static inline int get_ue_golomb(GetBitContext *gb)
{
int log = 2 * av_log2(buf) - 31;
LAST_SKIP_BITS(re, gb, 32 - log);
CLOSE_READER(re, gb);
- if (log < 7) {
- av_log(NULL, AV_LOG_ERROR, "Invalid UE golomb code\n");
+ if (log < 7)
return AVERROR_INVALIDDATA;
- }
buf >>= log;
buf--;
} else {
int log;
skip_bits(gb, 8);
- buf |= 1 | show_bits_long(gb, 24);
+ buf |= 1 | show_bits(gb, 24);
if ((buf & 0xAAAAAAAA) == 0)
return INVALID_VLC;