Browse Source

lavc/golomb: add value range comment for set_ue_golomb().

set_ue_golomb just support 2^16 - 2 at most, becase this function call
put_bits, and put_bits just support write up to 31 bits, when write 32
bit in put_bits, it's will overwrite the bit buffer, and the default
assert level is 0, the av_assert2(n <= 31 && value < (1U << n)) in
put_bits can not be trigger runtime.

Signed-off-by: Jun Zhao <jun.zhao@intel.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n3.4
Jun Zhao Michael Niedermayer 8 years ago
parent
commit
ea1d07aed9
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/golomb.h

+ 1
- 1
libavcodec/golomb.h View File

@@ -458,7 +458,7 @@ static inline int get_te(GetBitContext *s, int r, char *file, const char *func,
#endif /* TRACE */

/**
* write unsigned exp golomb code.
* write unsigned exp golomb code. 2^16 - 2 at most
*/
static inline void set_ue_golomb(PutBitContext *pb, int i)
{


Loading…
Cancel
Save