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

保存重新编译即可。

参考:Ubuntu 源码安装opencv320 报错 error: 'CODEC_FLAG_GLOBAL_HEADER' was not declared in this scope_guo_lei_lamant

posted @ 2021-12-30 14:26  盛世芳华  阅读(1313)  评论(0编辑  收藏  举报