[Libav-user] [FFmpeg-devel] audio_encode_example

Don Moir donmoir at comcast.net
Wed Feb 29 22:58:41 CET 2012

> i've read ffmpeg-0.10\doc\examples\decoding_encoding.c. Its having
> audio_encode_example() using avcodec_encode_audio() (which is deprecated).

> Can someone provide audio_encode_example() using new API of
> avcodec_encode_audio2()?

If you look in libavcodec\utils.c you will see that avcodec_encode_audio now
calls avcodec_encode_audio2. You can look at the code for
avcodec_encode_audio (utils.c) and check how it now handles
avcodec_encode_audio2 and that should be enough for you to move to

More information about the Libav-user mailing list