aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-12-21 15:49:56 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-01-03 15:07:45 +0100
commit46d0aee3c498521f5fbde9d5ec587978ff203f0d (patch)
tree0c90183c816a265239bf1a73d8ddf601ef258c2b /libavcodec
parent55e2dc7f77d6af421ceefb0df7d13b9d43ea91d3 (diff)
downloadffmpeg-46d0aee3c498521f5fbde9d5ec587978ff203f0d.tar.gz
lavc: Do not fail audio decoding if user has set a custom get_buffer.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit c3846e3ebab610be691adb8b40d376dc2f675dc4) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/utils.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 1685b4d196..d15f652263 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -999,9 +999,10 @@ int attribute_align_arg avcodec_decode_audio3(AVCodecContext *avctx, int16_t *sa
int ret, got_frame = 0;
if (avctx->get_buffer != avcodec_default_get_buffer) {
- av_log(avctx, AV_LOG_ERROR, "A custom get_buffer() cannot be used with "
+ av_log(avctx, AV_LOG_ERROR, "Overriding custom get_buffer() for "
"avcodec_decode_audio3()\n");
- return AVERROR(EINVAL);
+ avctx->get_buffer = avcodec_default_get_buffer;
+ avctx->release_buffer = avcodec_default_release_buffer;
}
ret = avcodec_decode_audio4(avctx, &frame, &got_frame, avpkt);