Quoting Diego Biurrun (2016-06-09 17:12:49)
> @@ -1658,34 +1657,34 @@ static void stabilize_lsps(double *lsps, int num)
> /**
> * Test if there's enough bits to read 1 superframe.
> *
> - * @param orig_gb bit I/O context used for reading. This function
> + * @param orig_bc bit I/O context used for reading. This function
> * does not modify the state of the bitreader; it
> * only uses it to copy the current stream position
> * @param s WMA Voice decoding context private data
> * @return < 0 on error, 1 on not enough bits or 0 if OK.
> */
> -static int check_bits_for_superframe(GetBitContext *orig_gb,
> +static int check_bits_for_superframe(BitstreamContext *orig_bc,
> WMAVoiceContext *s)
> {
> - GetBitContext s_gb, *gb = &s_gb;
> + BitstreamContext s_bc, *bc = &s_bc;
> int n, need_bits, bd_idx;
> const struct frame_type_desc *frame_desc;
>
> /* initialize a copy */
> - init_get_bits(gb, orig_gb->buffer, orig_gb->size_in_bits);
> - skip_bits_long(gb, get_bits_count(orig_gb));
> - assert(get_bits_left(gb) == get_bits_left(orig_gb));
> + bitstream_init(bc, orig_bc->buffer, orig_bc->size_in_bits);
> + bitstream_skip(bc, bitstream_tell(orig_bc));
> + assert(bitstream_bits_left(bc) == bitstream_bits_left(orig_bc));
This could be just *bc = *orig_bc
Otherwise looks ok
--
Anton Khirnov
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel