[FFmpeg-cvslog] adpcm: convert adpcm_ima_apc 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:07:20 2012 -0700| [74d7ac95fbf4913406a81f85e2f020867e771b0e] | committer: Ronald S. Bultje

adpcm: convert adpcm_ima_apc to bytestream2.

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

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

diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c
index 16044d8..90caf65 100644
--- a/libavcodec/adpcm.c
+++ b/libavcodec/adpcm.c
@@ -802,8 +802,8 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data,
         }
         break;
     case CODEC_ID_ADPCM_IMA_APC:
-        while (src < buf + buf_size) {
-            uint8_t v = *src++;
+        while (bytestream2_get_bytes_left(&gb) > 0) {
+            int v = bytestream2_get_byteu(&gb);
             *samples++ = adpcm_ima_expand_nibble(&c->status[0],  v >> 4  , 3);
             *samples++ = adpcm_ima_expand_nibble(&c->status[st], v & 0x0F, 3);
         }



More information about the ffmpeg-cvslog mailing list