* [FFmpeg-devel] [PATCH] avcodec/audiotoolboxenc: return error value if encode failed
@ 2022-06-24 3:02 Steven Liu
2022-06-24 5:03 ` "zhilizhao(赵志立)"
0 siblings, 1 reply; 11+ messages in thread
From: Steven Liu @ 2022-06-24 3:02 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Steven Liu
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 failed.
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
---
libavcodec/audiotoolboxenc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavcodec/audiotoolboxenc.c b/libavcodec/audiotoolboxenc.c
index f8305ab89b..50369f4f00 100644
--- a/libavcodec/audiotoolboxenc.c
+++ b/libavcodec/audiotoolboxenc.c
@@ -554,11 +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_WARNING, "Encode error: %i\n", ret);
}
- return 0;
+ return ret;
}
static av_cold void ffat_encode_flush(AVCodecContext *avctx)
--
2.25.0
_______________________________________________
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".
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [FFmpeg-devel] [PATCH] avcodec/audiotoolboxenc: return error value if encode failed
2022-06-24 3:02 [FFmpeg-devel] [PATCH] avcodec/audiotoolboxenc: return error value if encode failed 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
0 siblings, 2 replies; 11+ messages in thread
From: "zhilizhao(赵志立)" @ 2022-06-24 5:03 UTC (permalink / raw)
To: FFmpeg development discussions and patches; +Cc: Steven Liu
> On Jun 24, 2022, at 11:02 AM, 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 failed.
>
> Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
> ---
> libavcodec/audiotoolboxenc.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/libavcodec/audiotoolboxenc.c b/libavcodec/audiotoolboxenc.c
> index f8305ab89b..50369f4f00 100644
> --- a/libavcodec/audiotoolboxenc.c
> +++ b/libavcodec/audiotoolboxenc.c
> @@ -554,11 +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_WARNING, "Encode error: %i\n", ret);
ret comes from AudioConverterFillComplexBuffer, which is defined by
macOS/iOS and isn’t the same as errno.h, so it should not be returned
directly.
Remap ret from `kAudioConverterErr_xxx` to AVERROR, or just return
AVERROR_EXTERNAL.
Since now the error code is treated as error, the log level should
be changed to AV_LOG_ERROR.
> }
>
> - return 0;
> + return ret;
> }
>
> static av_cold void ffat_encode_flush(AVCodecContext *avctx)
> --
> 2.25.0
>
> _______________________________________________
> 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".
_______________________________________________
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".
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [FFmpeg-devel] [PATCH] avcodec/audiotoolboxenc: return error value if encode failed
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
1 sibling, 0 replies; 11+ messages in thread
From: Steven Liu @ 2022-06-24 5:38 UTC (permalink / raw)
To: FFmpeg development discussions and patches; +Cc: Steven Liu
"zhilizhao(赵志立)" <quinkblack@foxmail.com> 于2022年6月24日周五 13:03写道:
>
>
>
> > On Jun 24, 2022, at 11:02 AM, 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 failed.
> >
> > Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
> > ---
> > libavcodec/audiotoolboxenc.c | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/libavcodec/audiotoolboxenc.c b/libavcodec/audiotoolboxenc.c
> > index f8305ab89b..50369f4f00 100644
> > --- a/libavcodec/audiotoolboxenc.c
> > +++ b/libavcodec/audiotoolboxenc.c
> > @@ -554,11 +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_WARNING, "Encode error: %i\n", ret);
>
> ret comes from AudioConverterFillComplexBuffer, which is defined by
> macOS/iOS and isn’t the same as errno.h, so it should not be returned
> directly.
>
> Remap ret from `kAudioConverterErr_xxx` to AVERROR, or just return
> AVERROR_EXTERNAL.
>
> Since now the error code is treated as error, the log level should
> be changed to AV_LOG_ERROR.
Good catch, will modify them.
>
> > }
> >
> > - return 0;
> > + return ret;
> > }
> >
> > static av_cold void ffat_encode_flush(AVCodecContext *avctx)
> > --
> > 2.25.0
> >
Thanks
Steven
_______________________________________________
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".
^ permalink raw reply [flat|nested] 11+ messages in thread
* [FFmpeg-devel] [PATCH v2] avcodec/audiotoolboxenc: return external error if encode failed
2022-06-24 5:03 ` "zhilizhao(赵志立)"
2022-06-24 5:38 ` Steven Liu
@ 2022-06-24 5:59 ` Steven Liu
2022-06-24 6:58 ` "zhilizhao(赵志立)"
1 sibling, 1 reply; 11+ messages in thread
From: Steven Liu @ 2022-06-24 5:59 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Steven Liu
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;
}
static av_cold void ffat_encode_flush(AVCodecContext *avctx)
--
2.25.0
_______________________________________________
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".
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [FFmpeg-devel] [PATCH v2] avcodec/audiotoolboxenc: return external error if encode failed
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
0 siblings, 1 reply; 11+ messages in thread
From: "zhilizhao(赵志立)" @ 2022-06-24 6:58 UTC (permalink / raw)
To: FFmpeg development discussions and patches; +Cc: Steven Liu
> 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.
> static av_cold void ffat_encode_flush(AVCodecContext *avctx)
> --
> 2.25.0
>
> _______________________________________________
> 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".
_______________________________________________
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".
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [FFmpeg-devel] [PATCH v2] avcodec/audiotoolboxenc: return external error if encode failed
2022-06-24 6:58 ` "zhilizhao(赵志立)"
@ 2022-06-24 7:05 ` Steven Liu
2022-08-19 15:14 ` James Almer
0 siblings, 1 reply; 11+ messages in thread
From: Steven Liu @ 2022-06-24 7:05 UTC (permalink / raw)
To: FFmpeg development discussions and patches; +Cc: Steven Liu
"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
>
> > static av_cold void ffat_encode_flush(AVCodecContext *avctx)
> > --
> > 2.25.0
> >
> > _______________________________________________
Thanks
Steven
_______________________________________________
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".
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [FFmpeg-devel] [PATCH v2] avcodec/audiotoolboxenc: return external error if encode failed
2022-06-24 7:05 ` Steven Liu
@ 2022-08-19 15:14 ` James Almer
2022-08-22 2:48 ` "zhilizhao(赵志立)"
0 siblings, 1 reply; 11+ messages in thread
From: James Almer @ 2022-08-19 15:14 UTC (permalink / raw)
To: ffmpeg-devel
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".
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [FFmpeg-devel] [PATCH v2] avcodec/audiotoolboxenc: return external error if encode failed
2022-08-19 15:14 ` James Almer
@ 2022-08-22 2:48 ` "zhilizhao(赵志立)"
2022-08-22 3:01 ` Steven Liu
0 siblings, 1 reply; 11+ messages in thread
From: "zhilizhao(赵志立)" @ 2022-08-22 2:48 UTC (permalink / raw)
To: FFmpeg development discussions and patches
> On Aug 19, 2022, at 11:14 PM, James Almer <jamrial@gmail.com> wrote:
>
> 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?
There is a patch which doesn’t get apply yet:
http://ffmpeg.org/pipermail/ffmpeg-devel/2022-June/298199.html
> _______________________________________________
> 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".
_______________________________________________
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".
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [FFmpeg-devel] [PATCH v2] avcodec/audiotoolboxenc: return external error if encode failed
2022-08-22 2:48 ` "zhilizhao(赵志立)"
@ 2022-08-22 3:01 ` Steven Liu
2022-10-05 12:14 ` Andreas Rheinhardt
0 siblings, 1 reply; 11+ messages in thread
From: Steven Liu @ 2022-08-22 3:01 UTC (permalink / raw)
To: FFmpeg development discussions and patches
"zhilizhao(赵志立)" <quinkblack@foxmail.com> 于2022年8月22日周一 10:49写道:
>
>
>
> > On Aug 19, 2022, at 11:14 PM, James Almer <jamrial@gmail.com> wrote:
> >
> > 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?
>
> There is a patch which doesn’t get apply yet:
>
> http://ffmpeg.org/pipermail/ffmpeg-devel/2022-June/298199.html
commit as 627543f58a3166810b9cd9c8b483678c82a99be9
>
> > _______________________________________________
> > 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".
>
> _______________________________________________
> 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".
Thanks
_______________________________________________
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".
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [FFmpeg-devel] [PATCH v2] avcodec/audiotoolboxenc: return external error if encode failed
2022-08-22 3:01 ` Steven Liu
@ 2022-10-05 12:14 ` Andreas Rheinhardt
2022-10-05 15:25 ` Steven Liu
0 siblings, 1 reply; 11+ messages in thread
From: Andreas Rheinhardt @ 2022-10-05 12:14 UTC (permalink / raw)
To: ffmpeg-devel
Steven Liu:
> "zhilizhao(赵志立)" <quinkblack@foxmail.com> 于2022年8月22日周一 10:49写道:
>>
>>
>>
>>> On Aug 19, 2022, at 11:14 PM, James Almer <jamrial@gmail.com> wrote:
>>>
>>> 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?
>>
>> There is a patch which doesn’t get apply yet:
>>
>> http://ffmpeg.org/pipermail/ffmpeg-devel/2022-June/298199.html
>
> commit as 627543f58a3166810b9cd9c8b483678c82a99be9
>>
You should backport this fix to 5.1. See ticket #9960.
- Andreas
_______________________________________________
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".
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [FFmpeg-devel] [PATCH v2] avcodec/audiotoolboxenc: return external error if encode failed
2022-10-05 12:14 ` Andreas Rheinhardt
@ 2022-10-05 15:25 ` Steven Liu
0 siblings, 0 replies; 11+ messages in thread
From: Steven Liu @ 2022-10-05 15:25 UTC (permalink / raw)
To: FFmpeg development discussions and patches
Andreas Rheinhardt <andreas.rheinhardt@outlook.com> 于2022年10月5日周三 20:14写道:
>
> Steven Liu:
> > "zhilizhao(赵志立)" <quinkblack@foxmail.com> 于2022年8月22日周一 10:49写道:
> >>
> >>
> >>
> >>> On Aug 19, 2022, at 11:14 PM, James Almer <jamrial@gmail.com> wrote:
> >>>
> >>> 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?
> >>
> >> There is a patch which doesn’t get apply yet:
> >>
> >> http://ffmpeg.org/pipermail/ffmpeg-devel/2022-June/298199.html
> >
> > commit as 627543f58a3166810b9cd9c8b483678c82a99be9
> >>
>
> You should backport this fix to 5.1. See ticket #9960.
Ok, cherry-picked.
Thanks
Steven
_______________________________________________
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".
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2022-10-05 15:26 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-24 3:02 [FFmpeg-devel] [PATCH] avcodec/audiotoolboxenc: return error value if encode failed 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
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
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