aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/aiff.c
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2008-03-05 12:02:32 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2008-03-05 12:02:32 +0000
commit28da7981d0965558d490780a984cb927019f0c06 (patch)
tree10c15d5126f9258ff66edeed591bd3d7d2394469 /libavformat/aiff.c
parent282ee4e766b1133fc3b04be5ad4c1b8671c51642 (diff)
downloadffmpeg-28da7981d0965558d490780a984cb927019f0c06.tar.gz
correctly compute bit rate for compressed audio, should fix seeking in aiff
Originally committed as revision 12327 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/aiff.c')
-rw-r--r--libavformat/aiff.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/aiff.c b/libavformat/aiff.c
index 91be89b303..4343e79c48 100644
--- a/libavformat/aiff.c
+++ b/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)