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

Michael Niedermayer michaelni
Wed Mar 10 11:43:26 CET 2010


On Tue, Mar 09, 2010 at 09:34:04PM +0100, Reimar D?ffinger wrote:
> 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;

after more thinking, patch ok if tested

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No great genius has ever existed without some touch of madness. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100310/88bb24b6/attachment.pgp>



More information about the ffmpeg-devel mailing list