diff avidec.c @ 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 5d3ac5652047
children 536e5527c1e0
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;