avcodec/pcm-dvd: fix 20bit 2 channels
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 18 Nov 2013 19:56:40 +0000 (20:56 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 18 Nov 2013 20:00:03 +0000 (21:00 +0100)
Fixes part of ticket3122

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/pcm-dvd.c

index 9696b09..b895e39 100644 (file)
@@ -180,11 +180,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;