更新时间:2023-01-23 17:33:07
看来您正在尝试阅读 AV_PIX_FMT_YUVJXXXP
不建议使用的框架(请参阅 libav doc ) 。您可以使用此解决方法来管理它:
It seems you're trying to read AV_PIX_FMT_YUVJXXXP
frames which are deprecated (see the libav doc). You can use this workaround to manage it :
AVPixelFormat pixFormat;
switch (_videoStream->codec->pix_fmt) {
case AV_PIX_FMT_YUVJ420P :
pixFormat = AV_PIX_FMT_YUV420P;
break;
case AV_PIX_FMT_YUVJ422P :
pixFormat = AV_PIX_FMT_YUV422P;
break;
case AV_PIX_FMT_YUVJ444P :
pixFormat = AV_PIX_FMT_YUV444P;
break;
case AV_PIX_FMT_YUVJ440P :
pixFormat = AV_PIX_FMT_YUV440P;
default:
pixFormat = _videoStream->codec->codec->pix_fmts;
break;
}