Browse Source

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
tags/v0.6
Reimar Döffinger 16 years ago
parent
commit
28eb577390
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      libavformat/avidec.c

+ 2
- 1
libavformat/avidec.c View File

@@ -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;



Loading…
Cancel
Save