[FFmpeg-devel] [PATCH 4/4] avformat/wavdec: dynamically set max_size by default

Andreas Rheinhardt andreas.rheinhardt at outlook.com
Thu Feb 29 01:12:08 EET 2024


Marton Balint:
> The wav demuxer by default tried to demux 4096-byte packets which caused
> packets with very few number of samples for files with high channel count.
> This caused a significant overhead especially since the latest ffmpeg.c
> threading changes.
> 
> So let's use a similar approach for selecting audio frame size which is already
> used in the PCM demuxer, which is to read 25 times per second but at most 1024
> samples.

1024 samples seems to be quite small, in particular for files with few
channels (like stereo).

- Andreas



More information about the ffmpeg-devel mailing list