Ubuntu 20.04源码编译安装opencv320 报错 error: 'CODEC_FLAG_GLOBAL_HEADER' was not declared in this scope的解决办法:
修改/opt/opencv/opencv-3.2.0/modules/videoio/src/cap_ffmpeg_impl.hpp,顶端添加如下代码:
#define AV_CODEC_FLAG_GLOBAL_HEADER (1 << 22)
#define CODEC_FLAG_GLOBAL_HEADER AV_CODEC_FLAG_GLOBAL_HEADER
#define AVFMT_RAWPICTURE 0x0020
保存重新编译即可。
标签:declared,opencv,GLOBAL,HEADER,FLAG,CODEC,error From: https://www.cnblogs.com/rainbow70626/p/17649814.html