diff options
author | Justin Ruggles | 2012-03-21 14:30:33 -0400 |
---|---|---|
committer | Justin Ruggles | 2012-03-22 11:45:36 -0400 |
commit | 02f88eec1d9069ab6bb6c4177471226186647a8f (patch) | |
tree | c45ee997d148b8ed8a907ab12c2e56cac22e8515 /libavformat | |
parent | 87818103a0d8e5021b950ea5906031a20d0d193b (diff) |
aiffdec: do not set bit rate if block duration is unknown
CC: libav-stable@libav.org
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/aiffdec.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavformat/aiffdec.c b/libavformat/aiffdec.c index 11bbcac775..bbac1ab30e 100644 --- a/libavformat/aiffdec.c +++ b/libavformat/aiffdec.c @@ -157,8 +157,10 @@ static unsigned int get_aiff_header(AVFormatContext *s, int size, if (!codec->block_align) codec->block_align = (codec->bits_per_coded_sample * codec->channels) >> 3; - codec->bit_rate = codec->sample_rate * (codec->block_align << 3) / - aiff->block_duration; + if (aiff->block_duration) { + codec->bit_rate = codec->sample_rate * (codec->block_align << 3) / + aiff->block_duration; + } /* Chunk is over */ if (size) |