Mercurial > libavcodec.hg
diff avcodec.h @ 4351:1e251b54cba2 libavcodec
avcodec_decode_audio2()
difference to avcodec_decode_audio() is that the user can pass the allocated size of the output buffer to the decoder and the decoder can check if theres enough space
author | michael |
---|---|
date | Sun, 14 Jan 2007 23:50:06 +0000 |
parents | a0cfbd6679c0 |
children | 65bb4ce33467 |
line wrap: on
line diff
--- a/avcodec.h Sun Jan 14 23:19:22 2007 +0000 +++ b/avcodec.h Sun Jan 14 23:50:06 2007 +0000 @@ -2511,18 +2511,21 @@ */ int avcodec_open(AVCodecContext *avctx, AVCodec *codec); + +attribute_deprecated int avcodec_decode_audio(AVCodecContext *avctx, int16_t *samples, + int *frame_size_ptr, + uint8_t *buf, int buf_size); /** * Decode an audio frame. * * @param avctx the codec context. * @param samples output buffer, 16 byte aligned - * @param frame_size_ptr the output buffer size in bytes, zero if no frame could be compressed + * @param frame_size_ptr the output buffer size in bytes (you MUST set this to the allocated size before calling avcodec_decode_audio2()), zero if no frame could be compressed * @param buf input buffer, 16 byte aligned * @param buf_size the input buffer size * @return 0 if successful, -1 if not. */ - -int avcodec_decode_audio(AVCodecContext *avctx, int16_t *samples, +int avcodec_decode_audio2(AVCodecContext *avctx, int16_t *samples, int *frame_size_ptr, uint8_t *buf, int buf_size); int avcodec_decode_video(AVCodecContext *avctx, AVFrame *picture,