[Libav-user] Why (c->frame_size = 0) ? -> Could not allocate -22 bytes for samples buffer

Joe Flowers joe.flowers at nofreewill.com
Fri Mar 1 12:56:19 CET 2013


> For PCM codecs, frame_size is 0 and calling
> av_samples_get_buffer_size() makes no sense.
> av_samples_get_buffer_size() returns AVERROR(EINVAL)
> which happens to be "-22".

Does this mean that when encoding raw s16le data to
AV_CODEC_ID_PCM_S16LE that I should expect a pkt.size = 0 too, even
though the pkt.data have the correctly encoded data in it?

Thanks!


More information about the Libav-user mailing list