mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-24 16:00:02 +01:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user