[Libav-user] AVFrame linesize for planar audio

Daneel V daneelveloper at gmail.com
Sat Apr 10 22:15:41 EEST 2021


Hi there,

Documentation states that AVFrame::linesize is "For audio, size in bytes 
of each plane."

Reading from an stereo audio media file with 1024 planar audio samples 
per frame and a AVSampleFormat of 4 bytes per sample, I should expect 
linesize to be 4096,
because each of the two planes (one per stereo channel) are 1024 samples 
* 4 bytes each. But reported linesize is 8192.

I'm pretty sure documentation is right and I'm obviously and blatantly 
missing the crux of the matter.

Please could you help me shedding some light on this matter?.

       Thank you.



More information about the Libav-user mailing list