[FFmpeg-cvslog] avutil/hwcontext_videotoolbox: silence warning for RGB

gnattu git at videolan.org
Thu Aug 15 15:11:16 EEST 2024


ffmpeg | branch: master | gnattu <gnattuoc at me.com> | Sat Aug 10 14:13:39 2024 +0800| [a1976e963fa441b6f645c425186f272d05def3f9] | committer: Zhao Zhili

avutil/hwcontext_videotoolbox: silence warning for RGB

Hardware frames with RGB colorspace will not have a YCbCrMatrixKey.
Currently, it will spam the console with warning if rgb frame is
uploaded.

Signed-off-by: Gnattu OC <gnattuoc at me.com>
Reviewed-by: Marvin Scholz <epirat07 at gmail.com>
Signed-off-by: Zhao Zhili <zhilizhao at tencent.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a1976e963fa441b6f645c425186f272d05def3f9
---

 libavutil/hwcontext_videotoolbox.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavutil/hwcontext_videotoolbox.c b/libavutil/hwcontext_videotoolbox.c
index 80eaab64f0..122a61d5e7 100644
--- a/libavutil/hwcontext_videotoolbox.c
+++ b/libavutil/hwcontext_videotoolbox.c
@@ -576,7 +576,7 @@ static int vt_pixbuf_set_colorspace(void *log_ctx,
             colormatrix, kCVAttachmentMode_ShouldPropagate);
     else {
         CVBufferRemoveAttachment(pixbuf, kCVImageBufferYCbCrMatrixKey);
-        if (src->colorspace != AVCOL_SPC_UNSPECIFIED)
+        if (src->colorspace != AVCOL_SPC_UNSPECIFIED && src->colorspace != AVCOL_SPC_RGB)
             av_log(log_ctx, AV_LOG_WARNING,
                 "Color space %s is not supported.\n",
                 av_color_space_name(src->colorspace));



More information about the ffmpeg-cvslog mailing list