diff options
-rw-r--r-- | libavcodec/adpcm.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c index e305220af5..cee1eed7bd 100644 --- a/libavcodec/adpcm.c +++ b/libavcodec/adpcm.c @@ -340,6 +340,9 @@ static int get_nb_samples(AVCodecContext *avctx, const uint8_t *buf, *coded_samples = 0; + if(ch <= 0) + return 0; + switch (avctx->codec->id) { /* constant, only check buf_size */ case CODEC_ID_ADPCM_EA_XAS: |