diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2007-01-14 23:50:06 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2007-01-14 23:50:06 +0000 |
commit | ac66834c759b7130fb5be51f63cb6dff9b294cba (patch) | |
tree | 8848eb2ec4306ff0babb163fede2da388f981c42 /libavcodec/avcodec.h | |
parent | aeeb0cac3d8ace239ce1fe0d98858ebbd37029a7 (diff) | |
download | ffmpeg-ac66834c759b7130fb5be51f63cb6dff9b294cba.tar.gz |
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
Originally committed as revision 7518 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/avcodec.h')
-rw-r--r-- | libavcodec/avcodec.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 8c908105cc..ed92f1a980 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -2511,18 +2511,21 @@ int avcodec_default_execute(AVCodecContext *c, int (*func)(AVCodecContext *c2, v */ 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, |