diff options
author | Rodger Combs <rodger.combs@gmail.com> | 2015-06-20 05:01:17 -0500 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-06-20 19:21:53 +0200 |
commit | 6b547180b9493877b83f3379f054e24108ca9fa5 (patch) | |
tree | 84d631288e2d04eccd4c7a1b8559bfab559da645 | |
parent | db426031dd27d28df76e833da7f4490c11240981 (diff) | |
download | ffmpeg-6b547180b9493877b83f3379f054e24108ca9fa5.tar.gz |
lavc/adpcm: THP: allow channel counts up to 10
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/adpcm.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c index 0228ce17d5..69ece18e21 100644 --- a/libavcodec/adpcm.c +++ b/libavcodec/adpcm.c @@ -84,7 +84,7 @@ static const int swf_index_tables[4][16] = { /* end of tables */ typedef struct ADPCMDecodeContext { - ADPCMChannelStatus status[6]; + ADPCMChannelStatus status[10]; int vqa_version; /**< VQA version. Used for ADPCM_IMA_WS */ } ADPCMDecodeContext; @@ -104,9 +104,11 @@ static av_cold int adpcm_decode_init(AVCodecContext * avctx) case AV_CODEC_ID_ADPCM_EA_R2: case AV_CODEC_ID_ADPCM_EA_R3: case AV_CODEC_ID_ADPCM_EA_XAS: + max_channels = 6; + break; case AV_CODEC_ID_ADPCM_THP: case AV_CODEC_ID_ADPCM_THP_LE: - max_channels = 6; + max_channels = 10; break; } if (avctx->channels < min_channels || avctx->channels > max_channels) { @@ -1428,7 +1430,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data, case AV_CODEC_ID_ADPCM_THP: case AV_CODEC_ID_ADPCM_THP_LE: { - int table[6][16]; + int table[10][16]; int ch; #define THP_GET16(g) \ |