[FFmpeg-devel] [RFC] larger PCM packets from avidec

Reimar Döffinger Reimar.Doeffinger
Tue Mar 9 21:34:04 CET 2010


Hello,
with the sample in MPlayer/incoming/demux-avi/mjpg-pcm.avi the AVI demuxer
returns audio packets of 128 bytes size each (in this case, 3ms worth of data),
causing quite a overhead.
It's not a big issue, but it seems too extreme and since there's no comment
on the code how that value was chosen I'd like to hear comments.
I guess the 1024 of patch below would be going too far in the other direction,
it's just meant as an example.
Index: libavformat/avidec.c
===================================================================
--- libavformat/avidec.c	(revision 22339)
+++ libavformat/avidec.c	(working copy)
@@ -749,7 +749,7 @@
         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;
+            size= 1024*ast->sample_size;
         else
             size= ast->sample_size;
 




More information about the ffmpeg-devel mailing list