Mercurial > libavformat.hg
changeset 5835:a92c2f3c87e8 libavformat
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.
author | reimar |
---|---|
date | Sun, 14 Mar 2010 13:38:00 +0000 |
parents | 134741dc8327 |
children | 2997c88028cd |
files | avidec.c |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/avidec.c Sat Mar 13 19:19:44 2010 +0000 +++ b/avidec.c Sun Mar 14 13:38:00 2010 +0000 @@ -749,7 +749,8 @@ 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;