Merge commit '3f0b6d7a6248a33df37b98cfcb37a1acce263f62'
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 23 May 2013 08:46:05 +0000 (10:46 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 23 May 2013 08:46:05 +0000 (10:46 +0200)
* commit '3f0b6d7a6248a33df37b98cfcb37a1acce263f62':
  wavpack: use bytestream2 in wavpack_decode_block

Conflicts:
libavcodec/wavpack.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavcodec/wavpack.c

@@@ -804,13 -793,12 +804,14 @@@ static int wavpack_decode_block(AVCodec
      s->and            = s->or = s->shift = 0;
      s->got_extra_bits = 0;
  
+     bytestream2_init(&gb, buf, buf_size);
      if (!wc->mkv_mode) {
-         s->samples = AV_RL32(buf);
-         buf       += 4;
+         s->samples = bytestream2_get_le32(&gb);
 -        if (s->samples != wc->samples)
 +        if (s->samples != wc->samples) {
 +            av_log(avctx, AV_LOG_ERROR, "mismatching sample count in block");
              return AVERROR_INVALIDDATA;
 +        }
  
          if (!s->samples) {
              *got_frame_ptr = 0;