mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
lavc: Do not fail audio decoding if user has set a custom get_buffer.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
077b086dea
commit
c3846e3eba
@ -991,9 +991,10 @@ int attribute_align_arg avcodec_decode_audio3(AVCodecContext *avctx, int16_t *sa
|
|||||||
int ret, got_frame = 0;
|
int ret, got_frame = 0;
|
||||||
|
|
||||||
if (avctx->get_buffer != avcodec_default_get_buffer) {
|
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");
|
"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);
|
ret = avcodec_decode_audio4(avctx, &frame, &got_frame, avpkt);
|
||||||
|
Loading…
Reference in New Issue
Block a user