[FFmpeg-cvslog] adpcm convert adpcm_ima_ea_sead to bytestream2.

Ronald S. Bultje git at videolan.org
Tue Mar 20 00:16:50 CET 2012


ffmpeg | branch: master | Ronald S. Bultje <rsbultje at gmail.com> | Sat Mar 17 14:35:26 2012 -0700| [524af484ed68f3a796ec93fe3a1017ca403da628] | committer: Ronald S. Bultje

adpcm convert adpcm_ima_ea_sead to bytestream2.

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

 libavcodec/adpcm.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c
index 0a60719..ebeb2da 100644
--- a/libavcodec/adpcm.c
+++ b/libavcodec/adpcm.c
@@ -860,9 +860,10 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data,
         }
         break;
     case CODEC_ID_ADPCM_IMA_EA_SEAD:
-        for (n = nb_samples >> (1 - st); n > 0; n--, src++) {
-            *samples++ = adpcm_ima_expand_nibble(&c->status[0], src[0] >> 4, 6);
-            *samples++ = adpcm_ima_expand_nibble(&c->status[st],src[0]&0x0F, 6);
+        for (n = nb_samples >> (1 - st); n > 0; n--) {
+            int byte = bytestream2_get_byteu(&gb);
+            *samples++ = adpcm_ima_expand_nibble(&c->status[0],  byte >> 4,   6);
+            *samples++ = adpcm_ima_expand_nibble(&c->status[st], byte & 0x0F, 6);
         }
         break;
     case CODEC_ID_ADPCM_EA:



More information about the ffmpeg-cvslog mailing list