Commit 02f88eec authored by Justin Ruggles's avatar Justin Ruggles

aiffdec: do not set bit rate if block duration is unknown

CC: libav-stable@libav.org
parent 87818103
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment