Mercurial > libavformat.hg
changeset 3110:3dade22abed6 libavformat
correctly compute bit rate for compressed audio, should fix seeking in aiff
author | bcoudurier |
---|---|
date | Wed, 05 Mar 2008 12:02:32 +0000 |
parents | 20e070d8706f |
children | 6f505b24ed57 |
files | aiff.c |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/aiff.c Tue Mar 04 01:31:15 2008 +0000 +++ b/aiff.c Wed Mar 05 12:02:32 2008 +0000 @@ -152,7 +152,8 @@ 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)