diff options
author | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2010-03-14 13:38:00 +0000 |
---|---|---|
committer | Reimar Döffinger <Reimar.Doeffinger@gmx.de> | 2010-03-14 13:38:00 +0000 |
commit | 28eb5773903a84c991d7f58756fdeaddaf58e46a (patch) | |
tree | a8bece76f1735447d752aa2cfeafdd2d9f2d1c2c /libavformat/avidec.c | |
parent | 686c781766e92d2798714a668b172a4bdf33a91f (diff) | |
download | ffmpeg-28eb5773903a84c991d7f58756fdeaddaf58e46a.tar.gz |
Avoid creating tiny (possibly only 64 bytes large) audio packets resulting in
huge processing and memory usage overhead for avi files with raw PCM audio.
Originally committed as revision 22521 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/avidec.c')
-rw-r--r-- | libavformat/avidec.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/avidec.c b/libavformat/avidec.c index d56dcd2154..cba34f8d3d 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -749,7 +749,8 @@ resync: if(ast->sample_size <= 1) // minorityreport.AVI block_align=1024 sample_size=1 IMA-ADPCM size= INT_MAX; else if(ast->sample_size < 32) - size= 64*ast->sample_size; + // arbitrary multiplier to avoid tiny packets for raw PCM data + size= 1024*ast->sample_size; else size= ast->sample_size; |