Commit 24b8aa84 authored by Baptiste Coudurier's avatar Baptiste Coudurier

set default bps to 16 in wav header

Originally committed as revision 15239 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent a7f361eb
...@@ -248,7 +248,8 @@ int put_wav_header(ByteIOContext *pb, AVCodecContext *enc) ...@@ -248,7 +248,8 @@ int put_wav_header(ByteIOContext *pb, AVCodecContext *enc)
} 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_IMA_WAV || enc->codec_id == CODEC_ID_ADPCM_MS || enc->codec_id == CODEC_ID_ADPCM_G726 || enc->codec_id == CODEC_ID_ADPCM_YAMAHA) { //
bps = 4; bps = 4;
} else { } else {
bps = av_get_bits_per_sample(enc->codec_id); if (!(bps = av_get_bits_per_sample(enc->codec_id)))
bps = 16; // default to 16
} }
if(bps != enc->bits_per_sample && enc->bits_per_sample){ if(bps != enc->bits_per_sample && enc->bits_per_sample){
av_log(enc, AV_LOG_WARNING, "requested bits_per_sample (%d) and actually stored (%d) differ\n", enc->bits_per_sample, bps); av_log(enc, AV_LOG_WARNING, "requested bits_per_sample (%d) and actually stored (%d) differ\n", enc->bits_per_sample, bps);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment