On Tue, Apr 11, 2017 at 12:22:27PM +0200, Luca Barbato wrote:
> The loop always consume the bit read and the new bitstream reader
> can read 0 bits just fine.
consume_S
> --- a/libavcodec/golomb.h
> +++ b/libavcodec/golomb.h
> @@ -290,16 +290,10 @@ static inline int get_ur_golomb_jpegls(BitstreamContext
> *bc, int k, int limit,
> return buf;
> } else {
> int i;
> - for (i = 0; i < limit && bitstream_peek(bc, 1) == 0 &&
> bitstream_bits_left(bc) > 0; i++)
> - bitstream_skip(bc, 1);
> - bitstream_skip(bc, 1);
> + for (i = 0; i < limit && bitstream_read_bit(bc) == 0 &&
> bitstream_bits_left(bc) > 0; i++);
Move the semicolon to the next line for readability.
LGTM
Diego
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel