Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Liu <lq@chinaffmpeg.org>2022-06-28 19:14:08 +0300
committerSteven Liu <lq@chinaffmpeg.org>2022-10-05 18:21:04 +0300
commit79bd6a21a04c7c457bfeb53fddc157bbd80cdaac (patch)
treee8539ce992bb860c7fc27fd9d3cdd6dcf01177cc
parent05d6157aab34bc49f23284645a8f34ece870f44d (diff)
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>
-rw-r--r--libavcodec/audiotoolboxenc.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/libavcodec/audiotoolboxenc.c b/libavcodec/audiotoolboxenc.c
index 00293154bf..8bbaabd960 100644
--- a/libavcodec/audiotoolboxenc.c
+++ b/libavcodec/audiotoolboxenc.c
@@ -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)