diff --git a/libavformat/wav.c b/libavformat/wav.c index c96bab42a0..d1f1bc65c9 100644 --- a/libavformat/wav.c +++ b/libavformat/wav.c @@ -65,7 +65,7 @@ int put_wav_header(ByteIOContext *pb, AVCodecContext *enc) bps = 8; } else if (enc->codec_id == CODEC_ID_MP2 || enc->codec_id == CODEC_ID_MP3) { bps = 0; - } else if (enc->codec_id == CODEC_ID_ADPCM_IMA_WAV || enc->codec_id == CODEC_ID_ADPCM_MS) { + } else if (enc->codec_id == CODEC_ID_ADPCM_IMA_WAV || enc->codec_id == CODEC_ID_ADPCM_MS || enc->codec_id == CODEC_ID_ADPCM_G726) { // bps = 4; } else { bps = 16; @@ -74,6 +74,8 @@ int put_wav_header(ByteIOContext *pb, AVCodecContext *enc) if (enc->codec_id == CODEC_ID_MP2 || enc->codec_id == CODEC_ID_MP3) { blkalign = enc->frame_size; //this is wrong, but seems many demuxers dont work if this is set correctly //blkalign = 144 * enc->bit_rate/enc->sample_rate; + } else if (enc->codec_id == CODEC_ID_ADPCM_G726) { // + blkalign = 1; } else if (enc->block_align != 0) { /* specified by the codec */ blkalign = enc->block_align; } else diff --git a/tests/ffmpeg.regression.ref b/tests/ffmpeg.regression.ref index 8af1689fdf..7e7e8f4a33 100644 --- a/tests/ffmpeg.regression.ref +++ b/tests/ffmpeg.regression.ref @@ -130,7 +130,7 @@ stddev:9330.70 PSNR:16.92 bytes:527360 stddev:4396.13 PSNR:23.46 bytes:526336 d056da679e6d6682812fffb28a7f0db6 *./data/a-ac3.rm 97983 ./data/a-ac3.rm -2d081e0e1f2e9bd4514e9ac8ec41884c *./data/a-g726.wav +9e6e66847a568ef4f1f229b0939d2aae *./data/a-g726.wav 24268 ./data/a-g726.wav a719ab6d47d8d601520edb13bf6136b4 *./data/out.wav stddev:8459.88 PSNR:17.77 bytes:48128 diff --git a/tests/rotozoom.regression.ref b/tests/rotozoom.regression.ref index acf1410ec4..f36cfd0792 100644 --- a/tests/rotozoom.regression.ref +++ b/tests/rotozoom.regression.ref @@ -130,7 +130,7 @@ stddev:9330.70 PSNR:16.92 bytes:527360 stddev:4396.13 PSNR:23.46 bytes:526336 d056da679e6d6682812fffb28a7f0db6 *./data/a-ac3.rm 97983 ./data/a-ac3.rm -2d081e0e1f2e9bd4514e9ac8ec41884c *./data/a-g726.wav +9e6e66847a568ef4f1f229b0939d2aae *./data/a-g726.wav 24268 ./data/a-g726.wav a719ab6d47d8d601520edb13bf6136b4 *./data/out.wav stddev:8459.88 PSNR:17.77 bytes:48128