I noticed that I can normally build the code of the repository I pulled from the GitHub directly, but the code I download from the release page still cannot be built. That doubts me a lot.
So I use diff
to compare the file ffmpeg_codecs.hpp
in modules/videoio/src
, and find that the problem above is fixed in PR#22357.
My friends. If you face the same problem (compile errors come from ffmpeg_codecs.hpp
) as mine, I think you can add #include <libavcodec/version.h>
after the line 62 of ffmpeg_codecs.hpp
. That works in my computer.
Sorry for my poor English.