In order to build C++ programs using libav you need -D__STDC_CONSTANT_MACROS appened to the CXXFLAGS. (cherry picked from commit d162994a81a311a8dd212a50a2d2ad2b088df97f)