Ubuntu 安装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
保存重新编译即可。