pcm-dvd: Fix 20bit decoding
authornu774 <honeycomb77@gmail.com>
Fri, 9 May 2014 12:47:41 +0000 (21:47 +0900)
committerLuca Barbato <lu_zero@gentoo.org>
Fri, 9 May 2014 14:07:15 +0000 (16:07 +0200)
Increment the pointer as needed.

Bug-Id: 592

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
libavcodec/pcm-dvd.c

index 172e93ae826457304baca9553afa931b7192d8ec..0872d293b0a7be1f2d859f7d89616454e2246eed 100644 (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;