From: James Almer <jamrial@gmail.com>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH v2] avcodec/audiotoolboxenc: return external error if encode failed
Date: Fri, 19 Aug 2022 12:14:15 -0300
Message-ID: <ec25d5fa-2f00-1217-9a7a-8ec8129225e2@gmail.com> (raw)
In-Reply-To: <CADxeRwnuY8iGvLt6_k0Qs8GH8DkDOydLxyXtMMuKfOwuh+A=iQ@mail.gmail.com>
On 6/24/2022 4:05 AM, Steven Liu wrote:
> "zhilizhao(赵志立)" <quinkblack@foxmail.com> 于2022年6月24日周五 14:59写道:
>>
>>
>>
>>> On Jun 24, 2022, at 1:59 PM, Steven Liu <lq@chinaffmpeg.org> wrote:
>>>
>>> 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.
>>>
>>> Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
>>> ---
>>> libavcodec/audiotoolboxenc.c | 6 ++++--
>>> 1 file changed, 4 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/libavcodec/audiotoolboxenc.c b/libavcodec/audiotoolboxenc.c
>>> index f8305ab89b..00293154bf 100644
>>> --- a/libavcodec/audiotoolboxenc.c
>>> +++ b/libavcodec/audiotoolboxenc.c
>>> @@ -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;
>>> }
>>>
>>
>> LGTM.
>
> Applied, Thanks
This is probably the source of the regression described in
https://trac.ffmpeg.org/ticket/9866
Can you look at it?
_______________________________________________
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".
next prev parent reply other threads:[~2022-08-19 15:14 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-24 3:02 [FFmpeg-devel] [PATCH] avcodec/audiotoolboxenc: return error value " Steven Liu
2022-06-24 5:03 ` "zhilizhao(赵志立)"
2022-06-24 5:38 ` Steven Liu
2022-06-24 5:59 ` [FFmpeg-devel] [PATCH v2] avcodec/audiotoolboxenc: return external error " Steven Liu
2022-06-24 6:58 ` "zhilizhao(赵志立)"
2022-06-24 7:05 ` Steven Liu
2022-08-19 15:14 ` James Almer [this message]
2022-08-22 2:48 ` "zhilizhao(赵志立)"
2022-08-22 3:01 ` Steven Liu
2022-10-05 12:14 ` Andreas Rheinhardt
2022-10-05 15:25 ` Steven Liu
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=ec25d5fa-2f00-1217-9a7a-8ec8129225e2@gmail.com \
--to=jamrial@gmail.com \
--cc=ffmpeg-devel@ffmpeg.org \
/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