Mainline instantiation code for libav libraries