[FFmpeg-cvslog] lavc/videotoolbox: fix format computation

rcombs git at videolan.org
Mon Nov 29 00:41:57 EET 2021


ffmpeg | branch: master | rcombs <rcombs at rcombs.me> | Sat Nov 13 01:00:08 2021 -0600| [b0c07f293883c5c37b5b1dbfabfca0d695250a60] | committer: rcombs

lavc/videotoolbox: fix format computation

Use sw_pix_fmt instead of pix_fmt (consistent with other hwaccels)

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

 libavcodec/videotoolbox.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/videotoolbox.c b/libavcodec/videotoolbox.c
index bd6e769207..010f553e57 100644
--- a/libavcodec/videotoolbox.c
+++ b/libavcodec/videotoolbox.c
@@ -1059,7 +1059,7 @@ static int videotoolbox_uninit(AVCodecContext *avctx)
 }
 
 static enum AVPixelFormat videotoolbox_best_pixel_format(AVCodecContext *avctx) {
-    const AVPixFmtDescriptor *descriptor = av_pix_fmt_desc_get(avctx->pix_fmt);
+    const AVPixFmtDescriptor *descriptor = av_pix_fmt_desc_get(avctx->sw_pix_fmt);
     if (!descriptor)
         return AV_PIX_FMT_NV12; // same as av_videotoolbox_alloc_context()
 



More information about the ffmpeg-cvslog mailing list