mirror of https://git.ffmpeg.org/ffmpeg.git
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:
parent
282ee4e766
commit
28da7981d0
|
@ -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…
Reference in New Issue