correctly compute bit rate for compressed audio, should fix seeking in aiff

Originally committed as revision 12327 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Baptiste Coudurier 2008-03-05 12:02:32 +00:00
parent 282ee4e766
commit 28da7981d0
1 changed files with 2 additions and 1 deletions

View File

@ -152,7 +152,8 @@ static unsigned int get_aiff_header(ByteIOContext *pb, AVCodecContext *codec,
if (!codec->block_align)
codec->block_align = (codec->bits_per_sample * codec->channels) >> 3;
codec->bit_rate = codec->sample_rate * (codec->block_align << 3);
codec->bit_rate = (codec->frame_size ? codec->sample_rate/codec->frame_size :
codec->sample_rate) * (codec->block_align << 3);
/* Chunk is over */
if (size)