[FFmpeg-devel] [PATCH 1/3] examples/decoding_encoding: upgrade to encode_audio2.

Michael Niedermayer michaelni at gmx.at
Thu Apr 12 14:11:39 CEST 2012

On Thu, Apr 12, 2012 at 12:48:21PM +0200, Nicolas George wrote:
> Le quartidi 24 germinal, an CCXX, Michael Niedermayer a écrit :
> > while its a tiny amount of code for us, i think we should investigate
> > if the API could be simplified to reduce the amount of code each
> > application needs to interface to avcodec_encode_audio2()
> I rather agree. All the more since that examples synthesizes its samples on
> the fly with exact framing: otherwise, it becomes necessary to split the
> samples according to the codec's frame_size, and that becomes even more
> annoying.
> nb_packets = av_simple_encode_samples(simple_context, samples, nb_samples, eof);
> for (i = 0; i < nb_packets; i++) {
>     packet = avcodec_simple_get_packet(simple_context);
>     ...
> }
> Maybe, something like that?

simple_context could maybe just be the AVCodecContext


Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I do not agree with what you have to say, but I'll defend to the death your
right to say it. -- Voltaire
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120412/3fae59bd/attachment.asc>

More information about the ffmpeg-devel mailing list