projects
/
platform
/
upstream
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8781810
)
aiffdec: do not set bit rate if block duration is unknown
author
Justin Ruggles
<justin.ruggles@gmail.com>
Wed, 21 Mar 2012 18:30:33 +0000
(14:30 -0400)
committer
Justin Ruggles
<justin.ruggles@gmail.com>
Thu, 22 Mar 2012 15:45:36 +0000
(11:45 -0400)
CC: libav-stable@libav.org
libavformat/aiffdec.c
patch
|
blob
|
history
diff --git
a/libavformat/aiffdec.c
b/libavformat/aiffdec.c
index
11bbcac
..
bbac1ab
100644
(file)
--- 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)