1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-15 14:13:16 +02:00

lavc/videotoolbox: fix format computation

Use sw_pix_fmt instead of pix_fmt (consistent with other hwaccels)
This commit is contained in:
rcombs
2021-11-13 01:00:08 -06:00
parent 79e51d6c0f
commit b0c07f2938

View File

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