Correct order of arguments for avcodec_check_dimensions().