diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 99c97c189514ad5059b4489555424e09efb040c1..5dd4e34df42357c903fccbff132fba6128154485 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -963,6 +963,9 @@ int av_get_bits_per_sample(enum CodecID codec_id){
         return 3;
     case CODEC_ID_ADPCM_SBPRO_4:
     case CODEC_ID_ADPCM_CT:
+    case CODEC_ID_ADPCM_WAV:
+    case CODEC_ID_ADPCM_MS:
+    case CODEC_ID_ADPCM_YAMAHA:
         return 4;
     case CODEC_ID_PCM_ALAW:
     case CODEC_ID_PCM_MULAW:
diff --git a/libavformat/riff.c b/libavformat/riff.c
index fcc91379276e2d6f8f8d24020bee86909f79c277..0fd4a83ed3fc15dc544992f675a976b3325091b7 100644
--- a/libavformat/riff.c
+++ b/libavformat/riff.c
@@ -336,7 +336,7 @@ int ff_put_wav_header(ByteIOContext *pb, AVCodecContext *enc)
     put_le32(pb, enc->sample_rate);
     if (enc->codec_id == CODEC_ID_MP2 || enc->codec_id == CODEC_ID_MP3 || enc->codec_id == CODEC_ID_GSM_MS) {
         bps = 0;
-    } else if (enc->codec_id == CODEC_ID_ADPCM_IMA_WAV || enc->codec_id == CODEC_ID_ADPCM_MS || enc->codec_id == CODEC_ID_ADPCM_G726 || enc->codec_id == CODEC_ID_ADPCM_YAMAHA) { //
+    } else if (enc->codec_id == CODEC_ID_ADPCM_G726) {
         bps = 4;
     } else {
         if (!(bps = av_get_bits_per_sample(enc->codec_id)))