diff options
author | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2008-09-07 04:17:15 +0000 |
---|---|---|
committer | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2008-09-07 04:17:15 +0000 |
commit | 24b8aa84d07d74ad121b4fac16f337c6e5394da9 (patch) | |
tree | cc33a91e77f48f1ada96a448a222f7063d689475 /libavformat/riff.c | |
parent | a7f361eb13bdaf3e6d98ea034c9769fc7429d902 (diff) | |
download | ffmpeg-24b8aa84d07d74ad121b4fac16f337c6e5394da9.tar.gz |
set default bps to 16 in wav header
Originally committed as revision 15239 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/riff.c')
-rw-r--r-- | libavformat/riff.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/riff.c b/libavformat/riff.c index d048445456..95e6248193 100644 --- a/libavformat/riff.c +++ b/libavformat/riff.c @@ -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) { // bps = 4; } 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){ av_log(enc, AV_LOG_WARNING, "requested bits_per_sample (%d) and actually stored (%d) differ\n", enc->bits_per_sample, bps); |