Message ID | tencent_D04A9F47AB3E4E0070DE2D009A3A401D9A08@qq.com |
---|---|
State | Accepted |
Commit | 0ef85a5471452068e96c16402bfc330b3ce50a84 |
Headers | show |
Series | [FFmpeg-devel,1/3] avcodec/videotoolboxenc: log when get_cv_pixel_format failed | expand |
Context | Check | Description |
---|---|---|
yinshiyou/make_loongarch64 | success | Make finished |
yinshiyou/make_fate_loongarch64 | success | Make fate finished |
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
tis 2023-01-03 klockan 18:18 +0800 skrev Zhao Zhili: > From: Zhao Zhili <zhilizhao@tencent.com> > > Signed-off-by: Zhao Zhili <zhilizhao@tencent.com> > --- > libavcodec/videotoolboxenc.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/libavcodec/videotoolboxenc.c > b/libavcodec/videotoolboxenc.c > index 27db4e0d5e..3b00e542cb 100644 > --- a/libavcodec/videotoolboxenc.c > +++ b/libavcodec/videotoolboxenc.c > @@ -2156,7 +2156,7 @@ static int get_cv_pixel_info( > > status = get_cv_pixel_format(avctx, av_format, av_color_range, > color, &range_guessed); > if (status) > - return AVERROR(EINVAL); > + return status; > > if (range_guessed) { > if (!vtctx->warned_color_range) { > @@ -2338,7 +2338,7 @@ static int > create_cv_pixel_buffer(AVCodecContext *avctx, > status > ); > > - return AVERROR_EXTERNAL; > + return status; Are these guaranteed to always be negative? /Tomas
> On Jan 4, 2023, at 02:11, Tomas Härdin <git@haerdin.se> wrote: > > tis 2023-01-03 klockan 18:18 +0800 skrev Zhao Zhili: >> From: Zhao Zhili <zhilizhao@tencent.com> >> >> Signed-off-by: Zhao Zhili <zhilizhao@tencent.com> >> --- >> libavcodec/videotoolboxenc.c | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/libavcodec/videotoolboxenc.c >> b/libavcodec/videotoolboxenc.c >> index 27db4e0d5e..3b00e542cb 100644 >> --- a/libavcodec/videotoolboxenc.c >> +++ b/libavcodec/videotoolboxenc.c >> @@ -2156,7 +2156,7 @@ static int get_cv_pixel_info( >> >> status = get_cv_pixel_format(avctx, av_format, av_color_range, >> color, &range_guessed); >> if (status) >> - return AVERROR(EINVAL); >> + return status; >> >> if (range_guessed) { >> if (!vtctx->warned_color_range) { >> @@ -2338,7 +2338,7 @@ static int >> create_cv_pixel_buffer(AVCodecContext *avctx, >> status >> ); >> >> - return AVERROR_EXTERNAL; >> + return status; > > Are these guaranteed to always be negative? Yes. > > /Tomas > > _______________________________________________ > 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".
> On Jan 4, 2023, at 10:35, zhilizhao(赵志立) <quinkblack@foxmail.com> wrote: > > > >> On Jan 4, 2023, at 02:11, Tomas Härdin <git@haerdin.se> wrote: >> >> tis 2023-01-03 klockan 18:18 +0800 skrev Zhao Zhili: >>> From: Zhao Zhili <zhilizhao@tencent.com> >>> >>> Signed-off-by: Zhao Zhili <zhilizhao@tencent.com> >>> --- >>> libavcodec/videotoolboxenc.c | 4 ++-- >>> 1 file changed, 2 insertions(+), 2 deletions(-) >>> >>> diff --git a/libavcodec/videotoolboxenc.c >>> b/libavcodec/videotoolboxenc.c >>> index 27db4e0d5e..3b00e542cb 100644 >>> --- a/libavcodec/videotoolboxenc.c >>> +++ b/libavcodec/videotoolboxenc.c >>> @@ -2156,7 +2156,7 @@ static int get_cv_pixel_info( >>> >>> status = get_cv_pixel_format(avctx, av_format, av_color_range, >>> color, &range_guessed); >>> if (status) >>> - return AVERROR(EINVAL); >>> + return status; >>> >>> if (range_guessed) { >>> if (!vtctx->warned_color_range) { >>> @@ -2338,7 +2338,7 @@ static int >>> create_cv_pixel_buffer(AVCodecContext *avctx, >>> status >>> ); >>> >>> - return AVERROR_EXTERNAL; >>> + return status; >> >> Are these guaranteed to always be negative? > > Yes. Patchset applied, thanks for the review. > >> >> /Tomas >> >> _______________________________________________ >> 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".
diff --git a/libavcodec/videotoolboxenc.c b/libavcodec/videotoolboxenc.c index 27db4e0d5e..3b00e542cb 100644 --- a/libavcodec/videotoolboxenc.c +++ b/libavcodec/videotoolboxenc.c @@ -2156,7 +2156,7 @@ static int get_cv_pixel_info( status = get_cv_pixel_format(avctx, av_format, av_color_range, color, &range_guessed); if (status) - return AVERROR(EINVAL); + return status; if (range_guessed) { if (!vtctx->warned_color_range) { @@ -2338,7 +2338,7 @@ static int create_cv_pixel_buffer(AVCodecContext *avctx, status ); - return AVERROR_EXTERNAL; + return status; } pix_buf_pool = VTCompressionSessionGetPixelBufferPool(vtctx->session);