set proper bits_per_sample value for ADPCM codecs

Originally committed as revision 5666 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Aurelien Jacobs
2006-07-08 07:14:00 +00:00
parent ab7e315396
commit f1b163e01e
2 changed files with 5 additions and 3 deletions

View File

@@ -658,7 +658,7 @@ static int get_audio_frame_size(AVCodecContext *enc, int size)
if (bits_per_sample) {
if (enc->channels == 0)
return -1;
frame_size = size / ((bits_per_sample >> 3) * enc->channels);
frame_size = (size << 3) / (bits_per_sample * enc->channels);
} else {
/* used for example by ADPCM codecs */
if (enc->bit_rate == 0)