From: Steven Liu <lq@chinaffmpeg.org>
To: ffmpeg-devel@ffmpeg.org
Cc: Steven Liu <lq@chinaffmpeg.org>, Zhao Zhili <zhilizhao@tencent.com>
Subject: [FFmpeg-devel] [PATCH] avcodec/audiotoolboxenc: return AVERROR_EXTERNAL immediately when encode error
Date: Wed, 29 Jun 2022 00:14:08 +0800
Message-ID: <20220628161408.15410-1-lq@chinaffmpeg.org> (raw)
In-Reply-To: <CAEu79SZJUNhkoHKjbEsH+Ord8LZes4OzR0AQap+T3g_0DcuLNA@mail.gmail.com>
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>
---
libavcodec/audiotoolboxenc.c | 5 ++---
1 file 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)
--
2.34.1
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
prev parent reply other threads:[~2022-06-28 16:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-28 14:42 [FFmpeg-devel] [PATCH] avcodec/audiotoolboxenc: return EAGAIN if frame_queue.available is 0 and not at->eof Steven Liu
2022-06-28 15:06 ` "zhilizhao(赵志立)"
2022-06-28 15:22 ` Jan Ekström
2022-06-28 15:55 ` Steven Liu
2022-06-28 16:14 ` Steven Liu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220628161408.15410-1-lq@chinaffmpeg.org \
--to=lq@chinaffmpeg.org \
--cc=ffmpeg-devel@ffmpeg.org \
--cc=zhilizhao@tencent.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git