[FFmpeg-cvslog] pcm-dvd: Fix 20bit decoding

nu774 git at videolan.org
Sun May 11 18:22:46 CEST 2014


ffmpeg | branch: release/2.2 | nu774 <honeycomb77 at gmail.com> | Fri May  9 21:47:41 2014 +0900| [e780c3daafe0588e035e752c771ebfcd2201746a] | committer: Reinhard Tartler

pcm-dvd: Fix 20bit decoding

Increment the pointer as needed.

Bug-Id: 592

Signed-off-by: Luca Barbato <lu_zero at gentoo.org>
(cherry picked from commit 9880a0d4b131ef36694d62f78060350a81f08b80)
Signed-off-by: Reinhard Tartler <siretart at tauware.de>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e780c3daafe0588e035e752c771ebfcd2201746a
---

 Changelog            |    1 +
 libavcodec/pcm-dvd.c |    8 ++++----
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/Changelog b/Changelog
index fd49c6f..30e63c9 100644
--- a/Changelog
+++ b/Changelog
@@ -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)
diff --git a/libavcodec/pcm-dvd.c b/libavcodec/pcm-dvd.c
index 172e93a..0872d29 100644
--- a/libavcodec/pcm-dvd.c
+++ b/libavcodec/pcm-dvd.c
@@ -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;



More information about the ffmpeg-cvslog mailing list