mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-20 13:57:00 +00:00
avcodec/audiotoolboxenc: return external error if encode failed
because the AudioConverterFillComplexBuffer can return 0 or 1 if success. so set the ret to 0 it AudioConverterFillComplexBuffer success and return ret value for success or return AVERROR_EXTERNAL when AudioConverterFillComplexBuffer failed. BTW change the error message log level from warning to error. Reviewed-by: Zhao Zhili <zhilizhao@tencent.com> Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
This commit is contained in:
parent
ebefca7b0e
commit
7c05b7951c
@ -554,11 +554,13 @@ static int ffat_encode(AVCodecContext *avctx, AVPacket *avpkt,
|
||||
avctx->frame_size,
|
||||
&avpkt->pts,
|
||||
&avpkt->duration);
|
||||
ret = 0;
|
||||
} else if (ret && ret != 1) {
|
||||
av_log(avctx, AV_LOG_WARNING, "Encode error: %i\n", ret);
|
||||
av_log(avctx, AV_LOG_ERROR, "Encode error: %i\n", ret);
|
||||
ret = AVERROR_EXTERNAL;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
static av_cold void ffat_encode_flush(AVCodecContext *avctx)
|
||||
|
Loading…
Reference in New Issue
Block a user