Hello,

I have a question:
The comments in samplefmt.h say that the linesize for a planar format is in linesize[0] and the same for all used planes. So if i decode an audiostream and the sampleFormat is AV_SAMPLE_FMT_FLTP and its stereo and the first AVFrame says that there are 1024 samples decoded (nb_samples). In my understanding the bytes per sample is 4 and the first two planes of data are used. So linesize[0] must be 1024*4 = 4096. But when i decode an AV_CODEC_ID_AAC the linesize[0] is set to 8192, which would be the total size of used planes in data. I tried the same with and AV_CODEC_ID_AC3 stream and there the linesize[0] is correctly set to 6144 after nb_samples = 1536. Both streams have AV_SAMPLE_FMT_FLTP and are stereo.

Thanks for your help,

Armin Trattnig
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to