[FFmpeg-devel] [PATCH+RFC] AVFrame for audio

Peter Ross pross
Sun Jul 11 15:33:25 CEST 2010


On Sun, Jul 11, 2010 at 11:12:56AM +0100, M?ns Rullg?rd wrote:
> Peter Ross <pross at xvid.org> writes:
> 
> > Hi,
> >
> > To prototype use of audio in AVFrame, I have modified the PCM encoder/decoder
> > and addded new public lavc functions.

> > [...] 
> > +/**
> > + * Encode an audio frame from samples into buf.
> > + *
> > + * @param avctx the codec context
> > + * @param[out] buf the output buffer
> > + * @param[in] buf_size the output buffer size
> > + * @param[in] frame the input buffer containing the samples
> > + * @return On error a negative value is returned, on success zero or the number
> > + * of bytes used to encode the data read from the input buffer.
> > + */
> > +int avcodec_encode_audio2(AVCodecContext *avctx, uint8_t *buf, int buf_size,
> > +                          const AVFrame *frame);
> 
> At some point, we should do something about the output buffer
> allocation too.  Currently, a ridiculous size is allocated in ffmpeg.c
> just to be on the safe side.

Agree, and should be easy enough to do. Ditto for video, right?

-- Peter
(A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)
-------------- 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/20100711/3d58fe8d/attachment.pgp>



More information about the ffmpeg-devel mailing list