On Wed, 04 Sep 2013 15:20:19 +0200, Armin Trattnig <[email protected]> wrote: > 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. >
>From a quick look, seems the aac decoder always allocates frames for 2048 samples, then reduces it to 1024 for SBR streams. No idea if something can be done about it. Is this a problem for you or you're just wondering? -- Anton Khirnov _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
