[FFmpeg-devel] [PATCH] Description of avcodec_encode_audio()

Michael Niedermayer michaelni
Fri Apr 3 18:48:00 CEST 2009

On Fri, Apr 03, 2009 at 04:20:14PM +0100, John Fletcher wrote:
> > > 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.

right, i remembered that short after sending my reply ...
maybe we should consider changing this API one day, i suspect its annoying
for user apps as well ...

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Breaking DRM is a little like attempting to break through a door even
though the window is wide open and the only thing in the house is a bunch
of things you dont want and which you would get tomorrow for free anyway
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090403/ba201288/attachment.pgp>

More information about the ffmpeg-devel mailing list