diff options
author | Reinhard Tartler <siretart@tauware.de> | 2012-01-15 20:32:11 +0100 |
---|---|---|
committer | Reinhard Tartler <siretart@tauware.de> | 2012-01-15 21:40:59 +0100 |
commit | e2ff436ef64589de8486517352e17f513886e15b (patch) | |
tree | 73a3cf85f848c9030c4da99f7b6188fccb0db27c /libavcodec/avcodec.h | |
parent | e6e7bfc11e93fe3499c576fa9466cb2e913b5965 (diff) | |
download | ffmpeg-e2ff436ef64589de8486517352e17f513886e15b.tar.gz |
lavc: Relax API strictness in avcodec_decode_audio3 with a custom get_buffer()
Do not fail audio decoding with avcodec_decode_audio3 if user has set a
custom get_buffer. Strictly speaking, this was never allowed by the API,
but it seems that some software packages did so anyways. In order to
unbreak applications (cf. http://bugs.debian.org/655890), this change
clarifies the API and overrides the custom get_buffer() with the defaults.
This change is inspired by a similar
commit (c3846e3ebab610be691adb8b40d376dc2f675dc4) in FFmpeg.
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
Diffstat (limited to 'libavcodec/avcodec.h')
-rw-r--r-- | libavcodec/avcodec.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index c195ad5b18..49d2a0f918 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -4070,6 +4070,11 @@ int avcodec_open2(AVCodecContext *avctx, AVCodec *codec, AVDictionary **options) * @warning The end of the input buffer avpkt->data should be set to 0 to ensure that * no overreading happens for damaged MPEG streams. * + * @warning You must not provide a custom get_buffer() when using + * avcodec_decode_audio3(). Doing so will override it with + * avcodec_default_get_buffer. Use avcodec_decode_audio4() instead, + * which does allow the application to provide a custom get_buffer(). + * * @note You might have to align the input buffer avpkt->data and output buffer * samples. The alignment requirements depend on the CPU: On some CPUs it isn't * necessary at all, on others it won't work at all if not aligned and on others |