pcm-dvd: Fix 20bit decoding

Increment the pointer as needed.

Bug-Id: 592

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
(cherry picked from commit 9880a0d4b1)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
This commit is contained in:
nu774
2014-05-09 21:47:41 +09:00
committed by Reinhard Tartler
parent 7f954ca502
commit e780c3daaf
2 changed files with 5 additions and 4 deletions

View File

@@ -2,6 +2,7 @@ Entries are sorted chronologically from oldest to youngest within each release,
releases are sorted from youngest to oldest.
version 10.1:
- pcm-dvd: Fix 20bit decoding (bug/592)
- avi: Improve non-interleaved detection (bug/666)
- arm: hpeldsp: fix put_pixels8_y2_{,no_rnd_}armv6
- arm: hpeldsp: prevent overreads in armv6 asm (bug/646)

View File

@@ -177,11 +177,11 @@ static void *pcm_dvd_decode_samples(AVCodecContext *avctx, const uint8_t *src,
dst32[2] = bytestream2_get_be16u(&gb) << 16;
dst32[3] = bytestream2_get_be16u(&gb) << 16;
t = bytestream2_get_byteu(&gb);
*dst32 += (t & 0xf0) << 8;
*dst32 += (t & 0x0f) << 12;
*dst32++ += (t & 0xf0) << 8;
*dst32++ += (t & 0x0f) << 12;
t = bytestream2_get_byteu(&gb);
*dst32 += (t & 0xf0) << 8;
*dst32 += (t & 0x0f) << 12;
*dst32++ += (t & 0xf0) << 8;
*dst32++ += (t & 0x0f) << 12;
}
} while (--blocks);
return dst32;