On Sat, Jul 08, 2017 at 07:25:52PM +0200, Paul B Mahol wrote: > On 7/8/17, foo86 <fooba...@gmail.com> wrote: > > On Sat, Jul 08, 2017 at 11:12:06AM +0200, Paul B Mahol wrote: > >> [...] > > > >> static inline void skip_bits(GetBitContext *s, int n) > >> { > >> +#ifdef CACHED_BITSTREAM_READER > >> + if (n <= s->bits_left) > >> + skip_remaining(s, n); > >> + else { > >> + n -= s->bits_left; > >> + skip_remaining(s, s->bits_left); > > This causes undefined behavior if s->bits_left == 64. > > Could you elaborate?, it looks to me Libav have same issue.
Calling skip_bits_long() with n > 64 after init_get_bits() causes this error: libavcodec/get_bits.h:309:14: runtime error: shift exponent 64 is too large for 64-bit type 'long unsigned int' _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel