diff options
author | Alexandra Hájková <alexandra@khirnov.net> | 2016-04-10 11:34:09 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2016-11-18 10:35:36 +0100 |
commit | b2c56301f9458207cfd16c66dc2f3ce15a336651 (patch) | |
tree | 0c54ab8c84434cc52504386eec34813312b797cf /libavcodec/msgsmdec.c | |
parent | 2188d53906015ea5dd5b2e446f8e5374beacbffe (diff) | |
download | ffmpeg-streaming-b2c56301f9458207cfd16c66dc2f3ce15a336651.zip ffmpeg-streaming-b2c56301f9458207cfd16c66dc2f3ce15a336651.tar.gz |
gsm: Convert to the new bitstream reader
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'libavcodec/msgsmdec.c')
-rw-r--r-- | libavcodec/msgsmdec.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libavcodec/msgsmdec.c b/libavcodec/msgsmdec.c index 92b5ae6..c26efa9 100644 --- a/libavcodec/msgsmdec.c +++ b/libavcodec/msgsmdec.c @@ -21,6 +21,7 @@ #define BITSTREAM_READER_LE #include "avcodec.h" +#include "bitstream.h" #include "gsm.h" #include "msgsmdec.h" @@ -30,10 +31,10 @@ int ff_msgsm_decode_block(AVCodecContext *avctx, int16_t *samples, const uint8_t *buf, int mode) { int res; - GetBitContext gb; - init_get_bits(&gb, buf, GSM_MS_BLOCK_SIZE * 8); - res = gsm_decode_block(avctx, samples, &gb, mode); + BitstreamContext bc; + bitstream_init(&bc, buf, GSM_MS_BLOCK_SIZE * 8); + res = gsm_decode_block(avctx, samples, &bc, mode); if (res < 0) return res; - return gsm_decode_block(avctx, samples + GSM_FRAME_SIZE, &gb, mode); + return gsm_decode_block(avctx, samples + GSM_FRAME_SIZE, &bc, mode); } |