[FFmpeg-devel] [PATCH] Description of avcodec_encode_audio()
Fri Apr 3 17:20:14 CEST 2009
> > I wish to encode 1920 samples of audio to a 16-bit PCM
> format, say for example using CODEC_ID_PCM_S16BE.
> > I need to set the size of the output buffer, buf_size, to
> 1920 * 2 = 3840 to achieve that.
> no, you need to set it to 3840 or a larger value
No, the function uses buf_size to decide how many samples to encode so you have to set it to exactly 3840 in this case.
More information about the ffmpeg-devel