diff options
author | Carl Eugen Hoyos <cehoyos@rainbow.studorg.tuwien.ac.at> | 2010-07-25 18:33:16 +0400 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@rainbow.studorg.tuwien.ac.at> | 2010-07-25 18:33:16 +0400 |
commit | b9542223a3f338e98e1d795273c2aaae775ae898 (patch) | |
tree | 4f2cbf9b5f6bd35ff403b06c570691344d3576a2 /libavcodec/adpcm.c | |
parent | f7bd4a8ebd7f7da3e5ecd883cd0f0685734ac167 (diff) |
Only 4-bit ADPCM IMA WAV files are supported.
Originally committed as revision 24493 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/adpcm.c')
-rw-r--r-- | libavcodec/adpcm.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c index eb044ba4b9..dbb57e5bf2 100644 --- a/libavcodec/adpcm.c +++ b/libavcodec/adpcm.c @@ -721,6 +721,12 @@ static av_cold int adpcm_decode_init(AVCodecContext * avctx) case CODEC_ID_ADPCM_CT: c->status[0].step = c->status[1].step = 511; break; + case CODEC_ID_ADPCM_IMA_WAV: + if (avctx->bits_per_coded_sample != 4) { + av_log(avctx, AV_LOG_ERROR, "Only 4-bit ADPCM IMA WAV files are supported\n"); + return -1; + } + break; case CODEC_ID_ADPCM_IMA_WS: if (avctx->extradata && avctx->extradata_size == 2 * 4) { c->status[0].predictor = AV_RL32(avctx->extradata); |