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

Originally committed as revision 12327 to svn://svn.ffmpeg.org/ffmpeg/trunk
pull/126/head
Baptiste Coudurier 17 years ago
parent 282ee4e766
commit 28da7981d0
  1. 3
      libavformat/aiff.c

@ -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)

Loading…
Cancel
Save