[Libav-user] I can't get audio decoding to work.

Robin Stevens rdstevens at gmail.com
Mon Jun 27 18:30:46 CEST 2016

On Sun, Jun 26, 2016 at 2:39 AM, Bill Messenger <apothemmusic at gmail.com> wrote:
> But I tried "std::memcpy(sampleBuffer + totalBufferSize, frame->data[0],
> dataSize-4);", and it still gave me the same result. I even tried
> subtracting 8, 16, 32, 64, and so on, and it still gave the same result.
> When I go up to dataSize/2, however, it doesn't give me that UNADDRESSABLE
> ACCESS error. Does frame->data[0] only contain half of the data for planar
> audio?

look at frame->data[1], [2], etc. If they are not null then there is data there.

frame->linesize[0] tells you how many bytes you can copy from data[0];
linesize[1] tells you how much data is in data[1], etc.


More information about the Libav-user mailing list