mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avcodec/audiotoolboxenc: return AVERROR_EXTERNAL immediately when encode error
Just return AVERROR_EXTERNAL immediately when encode error.
The other logic should keep the old behavior before commit 7c05b7951
.
Suggested-By: Zhao Zhili <zhilizhao@tencent.com>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
This commit is contained in:
parent
05d6157aab
commit
79bd6a21a0
@ -554,13 +554,12 @@ 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_ERROR, "Encode error: %i\n", ret);
|
||||
ret = AVERROR_EXTERNAL;
|
||||
return AVERROR_EXTERNAL;
|
||||
}
|
||||
|
||||
return ret;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static av_cold void ffat_encode_flush(AVCodecContext *avctx)
|
||||
|
Loading…
Reference in New Issue
Block a user