You can add the -strict experimental in your C++ code by setting the codec-context strict_std_complaince
variable to -2 before opening the codec.
AVCodecContext *c;
c->strict_std_compliance = -2;
/* open it */
ret = avcodec_open2(c, codec, NULL);
See the original author's explanation here.