diff mbox series

[FFmpeg-devel,06/16] lavc/videotoolbox: fix format computation

Message ID 20211122205330.43546-6-rcombs@rcombs.me
State New
Headers show
Series [FFmpeg-devel,01/16] ffmpeg: remove ffmpeg_videotoolbox | expand


Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Ridley Combs Nov. 22, 2021, 8:53 p.m. UTC
Use sw_pix_fmt instead of pix_fmt (consistent with other hwaccels)
 libavcodec/videotoolbox.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series


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()